Functional Area
: Exception Handling
Exceptions can be raised during program execution, either by the JudoScript language engine or by
the Java code invoked in the program. Both types of exceptions are handled in the same way.
In most blocks, at the end a catch : and finally : label can be used. Statements
following catch : are executed when an exception is raised. The built-in variable, $_ ,
in this context represents the exception object. The resume statement is new to Java
programmers; it allows program to continue following the line where the exception is thrown.
Statements following finally : are executed when control is leaving the current block.
These two are independent of each other but if catch is present, finally has to appear
after.
You can use throw statement to throw a new error exception or a Java exception, or
re-throw an existing one.
Related Syntax
Related Object Types