[erlang-questions] does shell:catch_exception(true) actually work?

Vlad Dumitrescu vladdu55@REDACTED
Thu Mar 26 20:25:36 CET 2009


On Thu, Mar 26, 2009 at 20:18, ryeguy <ryeguy1@REDACTED> wrote:
> This might sound stupid, but since when does the shell terminate when
> there's an exception? Here's what happens with mine:
>
> Erlang R13A (erts-5.7) [source] [smp:4:4] [rq:4] [async-threads:0]
> [hipe] [kernel-poll:false]
>
> Eshell V5.7  (abort with ^G)
> 1> bogus().
> ** exception error: undefined shell command bogus/0
> 2>

The process running the shell dies and is restarted. See here:

1> self().
<0.32.0>
2> bogus().
** exception error: undefined shell command bogus/0
3> self().
<0.35.0>
4> catch_exception(true).
false
5> bogus().
* exception error: undefined shell command bogus/0
6> self().
<0.35.0>

The first time, the process dies and another one is created to drive
the shell. The second time, the process is the same.

regards,
Vlad



More information about the erlang-questions mailing list