the caught (and matched) error to be handled
A function containing the code to be executed as part of a finally block.
A function containing the code to be executed as part of a try block.
A mapping of Error types to their corresponding CatchBlock.
Represents a constructor of Error or one of its subclasses. Primarily used when specifying which type of error will be caught.
Manages incoming errors from within a catch block. All unmatched errors will be re-thrown.
try {
// Do something...
} catch (e) {
Handle(e, {
Exception: e => {
// Handle a caught error of type Exception.
},
ReferenceError: e => {
// Handle a caught error of type ReferenceError.
}
})
}
the caught error to be handled
the CatchBlocks to be used for each type of expected error
Generated using TypeDoc
A function containing the code to be executed as part of a catch block.