Exceptions
try ... catch ... finally
Syntaxthrow
try {Usage
statements;
} catch (e[:errorType]) {
statements;
} finally {
statements;
}
- A try block must be followed by one or more catch blocks and/or by a single finally block.
- The finally block always executes, whether or not an exception was thrown, even if the try block exits using a return statement.
Syntax
- throw expr;
- throw new Error("...");