浏览代码

rename DEBUG to DIAGNOSTIC in crashdump messages

pull/2375/head
Fred Hebert 4 年前
父节点
当前提交
0845425ce4
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. +2
    -2
      src/rebar3.erl
  2. +1
    -1
      src/rebar_state.erl

+ 2
- 2
src/rebar3.erl 查看文件

@ -339,7 +339,7 @@ handle_error({error, {Module, Reason}}, Stacktrace) ->
case code:which(Module) of
non_existing ->
?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]),
?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;
%% Dump this error to console
?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]),
case StackTrace of
[] -> ok;

+ 1
- 1
src/rebar_state.erl 查看文件

@ -510,7 +510,7 @@ create_logic_providers(ProviderModules, State0) ->
?WITH_STACKTRACE(C,T,S)
?DEBUG("~p: ~p ~p", [C, T, S]),
?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.
to_list(#state_t{} = State) ->

正在加载...
取消
保存