From c2c1079ba241cb1eaa914f5457f21cba0875a61a Mon Sep 17 00:00:00 2001 From: Viacheslav Kovalev Date: Fri, 22 May 2015 18:08:35 +0300 Subject: Show stacktrace to errors caught in rebar3 module. --- src/rebar3.erl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/rebar3.erl b/src/rebar3.erl index 8fe6224..5321278 100644 --- a/src/rebar3.erl +++ b/src/rebar3.erl @@ -254,6 +254,11 @@ handle_error(Error) -> %% Dump this error to console ?ERROR("Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace", []), ?DEBUG("Uncaught error: ~p", [Error]), + case erlang:get_stacktrace() of + [] -> ok; + Trace -> + ?DEBUG("Stack trace to the error location: ~p", [Trace]) + end, ?INFO("When submitting a bug report, please include the output of `rebar3 report \"your command\"`", []), erlang:halt(1). -- cgit v1.1