[erlang-questions] Get call trace from function

Mats Cronqvist <>
Thu Feb 15 17:52:47 CET 2007


 wrote:
> Hello!
> 
> Is it possible to get the call trace that lead to a particular function
> call? I have a code like this:
> 
> handle_errors(_) ->
>  	?INTERNAL_ERROR.

   this icky hack is the "traditional" way. there might be a better way to do 
this nowadays.

catch erlang:error({foo}).
{'EXIT',{{foo},
          [{erl_eval,do_apply,5},
           {erl_eval,expr,5},
           {shell,exprs,6},
           {shell,eval_loop,3}]}}

   mats



More information about the erlang-questions mailing list