[erlang-questions] Get call trace from function

Lennart Ohman <>
Thu Feb 15 20:06:16 CET 2007


Hi, you might want to take a look at the match-spec actionterm
'caller'.
See http://www.erlang.se/doc/doc-5.5.3/erts-5.5.3/doc/html/part_frame.html

Section 1.2.2

Best Regards
Lennart

-------------------------------------------------------------
Lennart Ohman                   office  : +46-8-587 623 27
Sjoland & Thyselius Telecom AB  cellular: +46-70-552 67 35
Sehlstedtsgatan 6               fax     : +46-8-667 82 30
SE-115 28, STOCKHOLM, SWEDEN    email   : 

> -----Original Message-----
> From:  [mailto:erlang-questions-
> ] On Behalf Of 
> Sent: Thursday, February 15, 2007 5:45 PM
> To: 
> Subject: [erlang-questions] Get call trace from function
> 
> 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.
> 
> and I'd like to log how did the code end up at this internal error,
> which function called the handle_errors, that function was called by
> which function, etc.  Simply crashing here could be an option, but the
> code didn't use to crash and I don't want to change this.
> 
>  				Bye,NAR
> --
> "Beware of bugs in the above code; I have only proved it correct, not
>   tried it."
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions





More information about the erlang-questions mailing list