[erlang-questions] Inconsistent catch behaviour

Kostis Sagonas kostis@REDACTED
Thu Jun 18 10:35:46 CEST 2009


Adam Lindberg wrote:
> Hi!
> 
> How come I can write:
> 
> 1> catch 1 + a.
> 2> case catch 1 + a of A -> A end.
> 3> A = (catch 1 + a).
> 
> and even
> 
> 4> catch 1 + a.
> 5> A = v(-1).
> 
> but not
> 
> 4> A = catch 1 + a.

Ulf Wiger has already answered this question, but I want to ask a 
different one.  Why should one bother these days with catch (even 
mention it on this mailing list) when try-catch is available?

Kostis


More information about the erlang-questions mailing list