[erlang-questions] stdlib shell_catch_exception ?

Kevin Montuori <>
Sat Oct 17 01:09:44 CEST 2015


>>>>> "ep" == PAILLEAU Eric <> writes:


    ep> I do not see any difference by setting true or false,
    ep> even by starting a new local shell with ^G
    ep> what this parameter aim to do ?

Catch exceptions!  Watch the PIDs:

9> application:set_env(stdlib, shell_catch_exception, false).
ok
10> self().
<0.37.0>
11> 1/0.
** exception error: ...
12> self().
<0.46.0>
13> application:set_env(stdlib, shell_catch_exception, true).
ok
14> 1/0.
* exception error: ...
15> self().
<0.46.0>


(Really useful if you're doing ETS work in the shell.)


Cheers!
k.


-- 
  Kevin Montuori
  


More information about the erlang-questions mailing list