Alertra Script Language 1.9
on
The on command allows you to specify a label to jump to when an event happens.
usage: on [event] goto [label]
parameters:
req | name | type | description |
---|---|---|---|
Y | event | literal | Currently error is the only event that can be trapped. |
Y | label | literal | A valid label within the script to jump to when an event happens. If set to the literal "0", then the event handler is disabled and normal processing of the event is resumed. If set to the literal "next", then errors will no longer cause the script to end; execution will continue with the next statement. |
examples
on error goto handle_errors
Sets up an event handler that will send all "error" events to the "handle_errors" script label.
on error goto 0
Removes any previously set event handler for "error" events.
on error goto next
Causes the script to continue executing even if an error is generated; execution will continue with the next statement after the one that caused the error.
Alertra Script Language: Language Reference