[erlang-patches] Attempt at making stacktraces more readable
Anthony Ramine
n.oxyde@REDACTED
Mon Dec 16 12:46:26 CET 2013
Thanks for the example.
Apart from the infix operators, I can print such stack traces easily. Would printing of operators as fully-qualified erlang function calls be a game breaker?
--
Anthony Ramine
Le 16 déc. 2013 à 12:42, Björn Gustavsson <bgustavsson@REDACTED> a écrit :
> I did not understand your eunit question. Did you
> ask whether you should update stacktraces
> in eunit too?
>
> I have not seen stacktrace in eunit, since I have
> used eunit very little.
>
> Here are some examples of stacktraces produced
> by the shell:
>
> 1> lists:map(fun(X) -> X + 1 end, [a]).
> ** exception error: an error occurred when evaluating an arithmetic expression
> in operator +/2
> called as a + 1
> in call from lists:map/2 (lists.erl, line 1224)
> 2> lists:map(fun(X) -> lists:sum(X) + 1 end, [a]).
> ** exception error: no function clause matching lists:sum(a,0) (lists.erl, line 276)
> in function erl_eval:do_apply/6 (erl_eval.erl, line 573)
> in call from erl_eval:expr/5 (erl_eval.erl, line 395)
> in call from lists:map/2 (lists.erl, line 1224)
> 3>
>
> The code that formats the stacktrace can be found
> in lib.erl (in stdlib).
>
> The point with my answer was that we didn't want significantly
> different stacktraces depending on their origin. If you want
> to rewrite how the shell formats stacktraces, that is also
> fine. In that case, make sure that you include examples
> of the stacktraces in the commit message so that we
> can see how the stacktrace will look without having to
> build the branch in order to see a stacktrace.
>
>
>
>
> On Sat, Dec 14, 2013 at 12:46 PM, Anthony Ramine <n.oxyde@REDACTED> wrote:
> Ping?
>
> I have trouble understanding what they should look like, as in a lot of situations the shell does not even print a stack trace.
>
> Also the eunit format seems to be more verbose.
>
> Regards,
>
> --
> Anthony Ramine
>
> Le 8 juil. 2013 à 12:11, Anthony Ramine <n.oxyde@REDACTED> a écrit :
>
> > Ok. What about the eunit stacktraces?
> >
> > --
> > Anthony Ramine
> >
> > Le 8 juil. 2013 à 12:02, Björn Gustavsson a écrit :
> >
> >> On Sun, May 5, 2013 at 3:45 PM, Anthony Ramine <n.oxyde@REDACTED> wrote:
> >>
> >> To choose a format, Rosetta Code was my main source of inspiration [1].
> >>
> >>
> >> We think that it would be better if the stack traces would have the
> >> same format as in the shell.
> >>
> >> /Björn
> >>
> >
>
>
>
>
> --
> Björn Gustavsson, Erlang/OTP, Ericsson AB
More information about the erlang-patches
mailing list