-
Notifications
You must be signed in to change notification settings - Fork 8
Try Catch
Abe Pralle edited this page Sep 7, 2022
·
3 revisions
try
# code
catch ( err:MoreSpecificExceptionSubclass )
# code
catch ( ExceptionSubclassWithoutVariable )
# code
...
catch ( err:MoreGeneralExceptionSubclass )
# code
endTry
When an Exception (or subclass) is thrown directly or indirectly (via method call) in a try block - using throw - execution will resume in the first catch block with a variable type that is instanceOf the thrown exception.
escapeTry lets you escape (AKA break out of) a try block. This command can also be used in a catch block that is part of a try.