Skip to content

4.4. Error Handling#

Syntax#


(* Introduced in 0.6.0 *)
TryStatement = (* try_keyword: *) TRY_KEYWORD
(* expression: *) Expression
(* returns: *) ReturnsDeclaration?
(* body: *) Block
(* catch_clauses: *) CatchClauses;

(* Introduced in 0.6.0 *)
CatchClauses = (* item: *) CatchClause+;

(* Introduced in 0.6.0 *)
CatchClause = (* catch_keyword: *) CATCH_KEYWORD
(* error: *) CatchClauseError?
(* body: *) Block;

(* Introduced in 0.6.0 *)
CatchClauseError = (* name: *) IDENTIFIER?
(* parameters: *) ParametersDeclaration;

(* Introduced in 0.8.4 *)
RevertStatement = (* revert_keyword: *) REVERT_KEYWORD
(* error: *) IdentifierPath?
(* arguments: *) ArgumentsDeclaration
(* semicolon: *) SEMICOLON;

(* Deprecated in 0.5.0 *)
ThrowStatement = (* throw_keyword: *) THROW_KEYWORD
(* semicolon: *) SEMICOLON;

Documentation#

Note

This section is under construction. You are more than welcome to contribute suggestions to our GitHub repository.