Browse Source

rename DEBUG to DIAGNOSTIC in crashdump messages

pull/2375/head
Fred Hebert 4 years ago
parent
commit
0845425ce4
2 changed files with 3 additions and 3 deletions
  1. +2
    -2
      src/rebar3.erl
  2. +1
    -1
      src/rebar_state.erl

+ 2
- 2
src/rebar3.erl View File

@ -339,7 +339,7 @@ handle_error({error, {Module, Reason}}, Stacktrace) ->
case code:which(Module) of case code:which(Module) of
non_existing -> non_existing ->
?CRASHDUMP("~p: ~p~n~p~n~n", [Module, Reason, Stacktrace]), ?CRASHDUMP("~p: ~p~n~p~n~n", [Module, Reason, Stacktrace]),
?ERROR("Uncaught error in rebar_core. Run with DEBUG=1 to stacktrace or consult rebar3.crashdump", []),
?ERROR("Uncaught error in rebar_core. Run with DIAGNOSTIC=1 to stacktrace or consult rebar3.crashdump", []),
?DEBUG("Uncaught error: ~p ~p", [Module, Reason]), ?DEBUG("Uncaught error: ~p ~p", [Module, Reason]),
?INFO("When submitting a bug report, please include the output of `rebar3 report \"your command\"`", []); ?INFO("When submitting a bug report, please include the output of `rebar3 report \"your command\"`", []);
_ -> _ ->
@ -353,7 +353,7 @@ handle_error(Error, StackTrace) ->
%% Nothing should percolate up from rebar_core; %% Nothing should percolate up from rebar_core;
%% Dump this error to console %% Dump this error to console
?CRASHDUMP("Error: ~p~n~p~n~n", [Error, StackTrace]), ?CRASHDUMP("Error: ~p~n~p~n~n", [Error, StackTrace]),
?ERROR("Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace or consult rebar3.crashdump", []),
?ERROR("Uncaught error in rebar_core. Run with DIAGNOSTIC=1 to see stacktrace or consult rebar3.crashdump", []),
?DEBUG("Uncaught error: ~p", [Error]), ?DEBUG("Uncaught error: ~p", [Error]),
case StackTrace of case StackTrace of
[] -> ok; [] -> ok;

+ 1
- 1
src/rebar_state.erl View File

@ -510,7 +510,7 @@ create_logic_providers(ProviderModules, State0) ->
?WITH_STACKTRACE(C,T,S) ?WITH_STACKTRACE(C,T,S)
?DEBUG("~p: ~p ~p", [C, T, S]), ?DEBUG("~p: ~p ~p", [C, T, S]),
?CRASHDUMP("~p: ~p~n~p~n~n~p", [C, T, S, State0]), ?CRASHDUMP("~p: ~p~n~p~n~n~p", [C, T, S, State0]),
throw({error, "Failed creating providers. Run with DEBUG=1 for stacktrace or consult rebar3.crashdump."})
throw({error, "Failed creating providers. Run with DIAGNOSTIC=1 for stacktrace or consult rebar3.crashdump."})
end. end.
to_list(#state_t{} = State) -> to_list(#state_t{} = State) ->

Loading…
Cancel
Save