<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 16, 2015 at 7:24 PM, PAILLEAU Eric <span dir="ltr"><<a href="mailto:eric.pailleau@wanadoo.fr" target="_blank">eric.pailleau@wanadoo.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class=""><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
(Really useful if you're doing ETS work in the shell.)<br>
<br>
</blockquote>
<br></span>
Hi,<br>
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'.</blockquote><div><br></div><div>You can just say catch_exception, passing it a boolean argument:</div><div><br></div><div><div>1> self().</div><div><0.33.0></div><div>2> catch_exception(true).</div><div>false</div><div>3> 1/0.</div><div>* exception error: an error occurred when evaluating an arithmetic expression</div><div> in operator '/'/2</div><div> called as 1 / 0</div><div>4> self().</div><div><0.33.0></div></div><div><br></div><div>Also useful for working with sockets, since opening a socket in the shell and then having the shell die means the socket gets closed.</div><div><br></div><div>--steve</div></div></div></div>