JavaScriptTryStatement AST JavaScript Object
The JavaScriptTryStatement
object matches a try block in JavaScript.
The astType
value for this node is trystatement
.
Code Pattern
This object captures the following code pattern.
try {
// do something
} catch (error) {
// exception handling
}
Attributes
tryblock
(typeAstElement
): instructions in the try blockfinallyBlock
(typeAstElement
): instructions in the finally blockcatchBlock
(typeJavaScriptCatchStatement
): catch block with the exception name being caught.