Skip to main content
Previous sectionNext section

PopError

Specify when to pop error handlers off the stack.

Synopsis

[Miscellaneous]    PopError=n

n is either 1 (true) or 0 (false). The default value is 0.

Description

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.Miscellanous class (as described in the class reference) or by editing the CPF in a text editor (as described in the Editing the Active CPF section of the “Introduction to the Configuration Parameter File” chapter in this book).

To change this parameter for a single process only (as opposed to instance-wide), use the PopError() method of the %SYSTEM.Process class. See the class reference for details.