Arbortext IsoDraw > Macro Language Reference > Introduction > Language Basics > Flow Control Statements > Error Handling
  
Error Handling
Applies to Arbortext IsoDraw 7.0 F000 and later.
As soon as an error occurs in a macro or subMacro, execution of that macro or subMacro stops by default—even if the error is treatable. If the error was detected in a subMacro, the subMacro stops and the error is reported to the calling macro—which stops that calling macro. The error reporting continues to “bubble up” until all calling macros are stopped.
You can use the ON ERROR commands below to change the default error handling behavior. For example, you can prevent a macro from stopping when an error occurs using the command.
SUBMACRO DeepError_0
MESSAGE "Starting DeepError_0"
ERROR -1
MESSAGE "Ending DeepError_0"
END SUBMACRO
SUBMACRO DeepError_1
MESSAGE "Starting DeepError_1"
RUN DeepError_0
MESSAGE "Ending DeepError_1"
END SUBMACRO
SUBMACRO BubbleUpErrors
MESSAGE "Starting BubbleUpErrors"
RUN DeepError_1
MESSAGE "Ending BubbleUpErrors"
END SUBMACRO