☜ | $ETRAPDraft MDC Standard | ☞ |
contains code which is invoked in the event an error condition occurs. See 6.3.2- Error processing. When a process is initiated, but before any commands are processed, the value of $ETrap is the empty string.
The value of $ETrap may be stacked with the New command; New $ETrap has the effect of saving the current instantiation of $ETrap and creating a new instantiation initialized with the same value.
The value of $ETrap is changed with the Set command. Changing the value of $ETrap with a Set command instantiates a new trap; it does not save the old trap.
A Quit from $ETrap, either explicit or implicit (i.e., Set $ETrap = "Do ^ETRAP" has an implicit Quit at its end with an empty argument, if appropriate) will function as if a Quit had been issued at the "current" $STack. Behavior at the "popped" level will be determined by the value of $ECode. If $ECode is empty, execution proceeds normally. Otherwise, $ETrap is invoked at the new level.
Copyright © Standard Documents; 1977-2024 MUMPS Development Committee;
Copyright © Examples: 1995-2024 Ed de Moel;
Copyright © Annotations: 2003-2008 Jacquard Systems Research
Copyright © Annotations: 2008-2024 Ed de Moel.
Some specifications are "approved for inclusion in a future standard". Note that the MUMPS Development Committee cannot guarantee that such future standards will indeed be published.
This page most recently updated on 13-Sep-2014, 08:21:23.
For comments, contact Ed de Moel (demoel@jacquardsystems.com)