Specify when to pop error handlers off the stack.
n is either 1 (true) or 0 (false). The default value is 0.
This parameter has been retained for compatibility, but should not be used when building new applications.
When PopError is enabled (n = 1), InterSystems IRIS® data platform pop the $ZTRAP error handler off the stack when an error is triggered. In this case, when a $ZTRAP error handler is invoked by the instance, the error handler is removed from the stack. Thus, if an error occurs while the error handler is executing, that error is handled by the previous error handler on the stack.
When this parameter is not enabled, the normal behavior prevails: A $ZTRAP error handler stays active when the error handler is invoked. In this case, when a $ZTRAP error handler is invoked by the instance, that error handler remains on the stack of established error handlers. Thus, if an error occurs when the error handler is executing, that error handler attempts to invoke itself, receives the same error again, and enters an infinite loop, unless that error handler explicitly sets $ZTRAP to a new value.
Changing This Parameter
On the Compatibility page of the Management Portal (System Administration > Configuration > Additional Settings > Compatibility), in the PopError row, click Edit. Select PopError to enable this setting.
Instead of using the Management Portal, you can change PopError in the Config.MiscellanousOpens in a new tab class (as described in the class reference) or by editing the CPF with a text editor.
To change this parameter for a single process only (as opposed to instance-wide), use the PopError()Opens in a new tab method of the %SYSTEM.ProcessOpens in a new tab class. See the class reference for details.