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

Michael McDaniel erlangy@REDACTED
Thu Mar 26 20:04:09 CET 2009


Linux delora 2.6.24-23-386 #1 Thu Nov 27 18:10:58 UTC 2008 i686 GNU/Linux
Erlang R13A (erts-5.7) [rq:1] [async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.7  (abort with ^G)
1> catch_exception(true).
false
2> bogus().
* exception error: undefined shell command bogus/0
3> h().                  
1: catch_exception(true)
-> false
2: bogus()
-> {'EXIT',{{shell_undef,bogus,0},
            [{shell,shell_undef,2},
             {erl_eval,local_func,5},
             {shell,exprs,6},
             {shell,eval_exprs,6},
             {shell,eval_loop,3}]}}
ok
4> 


 hmmm, works for me on my Linux box

~M


On Thu, Mar 26, 2009 at 02:36:06PM -0400, Kevin wrote:
> 
> I've done all the googleing I could and still can't find an answer to 
> this.  This is making working with the shell
> very difficult since one slip up and my history is gone.  Am I missing 
> something here?
> 
> 
> 
> Erlang R13A (erts-5.7) [source] [smp:4:4] [rq:4] [async-threads:0] 
> [kernel-poll:false]
> 
> Eshell V5.7  (abort with ^G)
> 1> catch_exception(true).
> false
> 2> bogus().
> *** ERROR: Shell process terminated! ***
> 
> =ERROR REPORT==== 26-Mar-2009::14:31:32 ===
> Error in process <0.26.0> with exit value: 
> {undef,[{lib,format_exception,[3,error,{shell_undef,bogus,0},[{shell,shell_undef,2},{erl_eval,local_func,5},{shell,exprs,6},{shell,eval_exprs,6},{shell,eval_loop,3}],#Fun<shell.5.34888280>,#Fun<shell.4.77554270>]},{shell,report_exception,4},{shell,shell_rep,4},{shell... 
> 
> 
> Eshell V5.7  (abort with ^G)
> 1>
> 
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions

-- 
Michael McDaniel
Portland, Oregon, USA
http://autosys.us




More information about the erlang-questions mailing list