[erlang-questions] erl_syntax[_lib] error handling

Tuncer Ayaz tuncer.ayaz@REDACTED
Mon Feb 24 21:21:15 CET 2014

erl_syntax and erl_syntax_lib seem to favor throwing exceptions over
returning error terms. I found this hard to use due to the missing
documenation of what exceptions can be thrown by each function. Only
erl_syntax_lib:analyze_application/1 documents one exception it might
throw, and the documentation for other funs just states the following:
"An exception is thrown if..."

The only way to handle erl_syntax[_lib] errors I've seen so far is to
catch all exceptions, but that can filter/suppress any kind of

What's the recommended way to handle erl_syntax[_lib] errors?

More information about the erlang-questions mailing list