[erlang-questions] is this try expression idiom common?

Christian <>
Tue Nov 11 22:39:14 CET 2008


Read this paper for the design and intended use of the "new" (but
improved) exception handling.

http://www.erlang.se/workshop/2004/exception.pdf

A shorter, but not so detailed, read is the erlang reference manual:

http://erlang.org/doc/reference_manual/expressions.html#6.19

In short, yeah it is perfectly fine and it is what is documented.  It
should be noted that Erlang failure handling is much more focused
around letting another process supervise and handle crashes. What
should catch exceptions and what should use crashing is not so simple
to define though.

> To me this is a completely different idiom, absolutely nothing like a
> case expression, and opens erlang up to a more exception based control
> flow and error handling. Is this legit? Frowned upon? I searched the
> pragmatic book and there is not a single example of this.



More information about the erlang-questions mailing list