try
The EGL try statement indicates that the program continues running if a statement of any of the following kinds results in an error and is within the try statement:
- An input/output (I/O) statement
- A system-function invocation
- A call statement
If an exception occurs, processing resumes at the first statement in the onException block (if any), or at the first statement following the end of the try statement. A hard I/O error, however, is handled only if the system variable sysVar.handleHardIOErrors is set to 1; otherwise, the program displays a message (if possible) and ends.
A try statement has no effect on run-time behavior when an exception occurs in a function or program that is invoked from within the try statement.
For other details, see Exception handling.
- statement
- Any EGL statement.
- OnException
- A block of statements that run if an exception condition occurs.