diff options
author | Tristan Sloughter <tristan.sloughter@gmail.com> | 2015-05-22 10:36:22 -0500 |
---|---|---|
committer | Tristan Sloughter <tristan.sloughter@gmail.com> | 2015-05-22 10:36:22 -0500 |
commit | b7acb56f4710fe3fd11163f6874f82f0008625b6 (patch) | |
tree | 6a5e0b2728aecd5bad69b220bc48567f99e28bb7 | |
parent | 53552d3f77d5b34e7c1dc7a61348c254b5001b30 (diff) | |
parent | c2c1079ba241cb1eaa914f5457f21cba0875a61a (diff) |
Merge pull request #469 from kovyl2404/show-stacktrace
Show stacktrace to errors caught in rebar3 module.
-rw-r--r-- | src/rebar3.erl | 5 |
1 files changed, 5 insertions, 0 deletions
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). |