Skip to main content

^%ETN

^%ETN

In a routine, SET $ZTRAP="^%ETN" establishes the system-supplied error routine %ETN as the current error trap handler. %ETN executes in the context in which the error occurred that invoked it. (%ET is a legacy name for %ETN. Their functionality is identical, though %ETN is slightly more efficient.) The ^%ETN error handler always behaves as if it were preceded by an asterisk (*).

Because $ZTRAP in a procedure block cannot be used to go to a location that is outside the body of the procedure, SET $ZTRAP="^%ETN" cannot be used in a procedure. Attempting to do so results in a <SYNTAX> error.

For more information on %ETN and its entrypoints FORE^%ETN, BACK^%ETN, and LOG^%ETN, see (Legacy) Using ^%ETN for Error Logging.

FeedbackOpens in a new tab