[erlang-questions] stdlib shell_catch_exception ?

PAILLEAU Eric eric.pailleau@REDACTED
Sat Oct 17 00:55:50 CEST 2015


Hi,

by reading http://www.erlang.org/doc/man/STDLIB_app.html

shell_catch_exception = boolean()

     This parameter can be used to set the exception handling of the 
Erlang shell's evaluator process.

but :
-----------------------------------------------------------------------
Erlang/OTP 18 [erts-7.1] [source] [smp:2:2] [async-threads:10] [hipe] 
[kernel-poll:false]

Eshell V7.1  (abort with ^G)
1> application:set_env(stdlib, shell_catch_exception, false).
ok
2> 1 / 0 .
** exception error: an error occurred when evaluating an arithmetic 
expression
      in operator  '/'/2
         called as 1 / 0
3> application:set_env(stdlib, shell_catch_exception, true).
ok
4> 1 / 0 .
* exception error: an error occurred when evaluating an arithmetic 
expression
     in operator  '/'/2
        called as 1 / 0
5>

-----------------------------------------------------------------------

I do not see any difference by setting true or false,
even by starting a new local shell with ^G

what this parameter aim to do ?

Regards





More information about the erlang-questions mailing list