[erlang-questions] getting args with erlang:get_stacktrace or similar?

Lukas Larsson lukas@REDACTED
Wed Apr 5 09:48:27 CEST 2017


On Thu, Mar 30, 2017 at 7:34 PM, Vans S <vans_163@REDACTED> wrote:

> When we call erlang:get_stacktrace we can get the function + line where we
> crashed.
> Is there a way to get the arguments the function we crashed in was called,
> or a way to get the current line we crashed on, what the arguments
> are currently?

You get that information if the error is a function clause, however if you
crash for any other reason (badmatch, badarith, etc) within a function you
cannot get that information.

The reason for this is because the compiler may have found that the
arguments to the function in which you crashed to be dead and optimized the
values away.


PS. Sorry for late reply, for some reason the gmail spam filter keeps
putting all @yahoo.com e-mails in my spam folder :(
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170405/12dff6ae/attachment.htm>

More information about the erlang-questions mailing list