[erlang-patches] [PATCH] eunit: Format stacktraces with location information

Klas Johansson klas.johansson@REDACTED
Sun Feb 12 18:51:16 CET 2012


Hi,

I've noticed that eunit doesn't print stacktraces correctly since the
new format (with filenames and line numbers) was introduced in R15.
Here's a patch which addresses that.

    eunit: Format stacktraces with location information

    The format of stacktraces was changed in Erlang/OTP R15 (location
    information was added), but eunit was not adapted which had the effect
    that only the exception term was printed, but no stacktraces.

    Eunit now recognizes the new stacktrace format and prints them.

Perhaps the eunit_lib code could in the future be rewritten to use
lib:format_exception which is used by the shell to pretty-print
stacktraces (then eunit would have supported the location information
automatically), but at least this patch will give us stacktraces (with
location).

Fetch from here:

    git fetch git://github.com/klajo/otp.git eunit-stacktraces-with-location

More information here:

    https://github.com/klajo/otp/compare/maint...eunit-stacktraces-with-location
    https://github.com/klajo/otp/compare/maint...eunit-stacktraces-with-location.patch


BR,
Klas



More information about the erlang-patches mailing list