Erlang::Parser::Node::Try - a try/catch clause
A clause to catch exceptions. A block of expressions is evaluated; the last expression's value is optionally then matched against patterns and guards, and then a further block of statements executed. Exceptions raised therein can be caught in the catch clause. Finally, cleanup statements can be invoked.
exprs
A list of Erlang::Parser::Nodes; the last expression's value is that used in the of clause.
of
An optional list of Erlang::Parser::Node::Alts against which the last expression in exprs is matched.
catch
An optional list of Erlang::Parser::Node::Alts for exceptions raised during evaluation in exprs and of.
aft
An optional list of Erlang::Parser::Nodes, executed after all previous statements.
print
Pretty-prints the node to its filehandle argument.
try {ok, X} = my_fun(), binary_to_term(X) catch throw:Term -> Term after file:close(F) end
To install Erlang::Parser, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Erlang::Parser
CPAN shell
perl -MCPAN -e shell install Erlang::Parser
For more information on module installation, please visit the detailed CPAN module installation guide.