[erlang-questions] How to interpret lambda stacktrace?

Robert Virding rvirding@REDACTED
Wed Feb 17 16:49:21 CET 2010


The first part of the name, -amm_handle_ev/3- in your case is the
function name/arity in which the fun or comprehension is defined.
Then:

- for a fun this is followed by -fun- and the index of the fun within
the defining function. So "-fun-5-" means the fifth fun within the
function, as a whole.

- for a comprehension it is "-lc$^" and the index of the comprehension
within the module. It can be either "lc", "blc" or "lbc" depending on
type of comprehension. The "$^" has no significance as such.

These are basically just funny names which are most likely unique. Two
important points:

- NO this naming is not defined anywhere, it is purely internal.
- NO there is no guarantee that it won't be changed in the future.

So use it for info but be warned.

Robert

On 17 February 2010 05:33, Maxim Treskin <zerthurd@REDACTED> wrote:
> Hello
>
> Sometime I have writing code with nested lambda-functions and
> list-comprehensions.
> If this code contains, I have such stacktraces in crash report:
>
>    exception exit: {function_clause,
>                        [{asg_alt,'-amm_handle_ev/3-fun-5-',
>                             [undefined,#Fun<asg_alt.15.120311847>,
>                              pass]},
>                         {asg_alt,'-amm_handle_ev/3-lc$^3/1-3-',2},
>                         {asg_alt,'-amm_handle_ev/3-lc$^3/1-3-',2},
>                         {asg_alt,amm_handle_ev,3},
>                         {asg_pd,state_ready,2},
>                         {gen_fsm,handle_msg,7},
>                         {proc_lib,init_p_do_apply,3}]}
>
> Is there any way to understand which of lambda crashes? So, when
> function contains '-lc$' I can say that this is list-comprehension
> function, '/3' -  arity of top function, but what means '^3/1-3-' and
> '-fun-5-' ? Is this values has some relation with order of its
> definition or not?
>
> Thank you
>
> --
> Maxim Treskin
>
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
>
>


More information about the erlang-questions mailing list