Class: Try
Represents a try block, wrapping code that might throw exceptions.
Example
ts
try { ... } catch e : DomainException { ... }Constructors
Constructor
new Try(
body,catchExpr,finallyExpr,loc?):Try
Parameters
| Parameter | Type |
|---|---|
body | Expression |
catchExpr | Catch[] |
finallyExpr | Expression |
loc? | SourceLocation |
Returns
Try
Overrides
ASTNode.constructor
Methods
getMetadata()
getMetadata<
T>(key):T
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
T
Inherited from
ASTNode.getMetadata
hasMetadata()
hasMetadata(
key):boolean
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
boolean
Inherited from
ASTNode.hasMetadata
setMetadata()
setMetadata(
key,value):void
Parameters
| Parameter | Type |
|---|---|
key | string |
value | any |
Returns
void
Inherited from
ASTNode.setMetadata