[erlang-questions] fun in shell

Hans Bolinder hans.bolinder@REDACTED
Fri Mar 9 17:14:06 CET 2007

[Mats Cronqvist <mats.cronqvist@REDACTED>:]
>    running this;
>    F=fun(A,B) -> try A+B catch _:_->dontthinkso end end,
>    lists:zipwith(F,[1,2],[2,3]).
>    in the shell crashes, but works fine in compiled code.

The implementation of try/catch seems to be buggy. All modules
evaluating expressions by means of erl_eval are affected. Examples of
such modules are file (eval, script) and qlc (string_to_handle).

Thanks for pointing this out.

Best regards,

Hans Bolinder, Erlang/OTP team

More information about the erlang-questions mailing list