Re: Attempt at making stacktraces more readable
Anthony Ramine <[email protected]> Mon, 16 Dec 2013 12:46:26 +0100
| Newsgroups | gmane.comp.lang.erlang.patches |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 _______________________________________________ erlang-patches mailing list [email protected] http://erlang.org/mailman/listinfo/erlang-patches