JavaScriptCatchStatement AST JavaScript Object
The JavaScriptCatchStatement
object matches a catch block in JavaScript.
The astType
value for this node is catchstatement
.
Code Pattern
This object captures the code catch ....
in the following code pattern:
try {
// do something
} catch (error) {
// exception handling
}
Attributes
exception
(typeAstElement
): name of the exception (often anAstString
)statements
(typeAstElement
): instructions in the catch block