[erlang-questions] stdlib shell_catch_exception ?
Sat Oct 17 01:27:48 CEST 2015
On Fri, Oct 16, 2015 at 7:24 PM, PAILLEAU Eric <>
> (Really useful if you're doing ETS work in the shell.)
> thanks ! make sens now. What puzzled me is that exception message was
> raised both case, but shell is killed and restarted by supervisor if
> 'false' and stay alive if 'true'.
You can just say catch_exception, passing it a boolean argument:
* exception error: an error occurred when evaluating an arithmetic
in operator '/'/2
called as 1 / 0
Also useful for working with sockets, since opening a socket in the shell
and then having the shell die means the socket gets closed.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions