diff --git a/src/error_logger_lager_h.erl b/src/error_logger_lager_h.erl index 4456cb0..38e27f8 100644 --- a/src/error_logger_lager_h.erl +++ b/src/error_logger_lager_h.erl @@ -274,6 +274,9 @@ format_mfa({M, F, A, Props}) when is_list(Props) -> Line -> [format_mfa({M, F, A}), io_lib:format(" line ~w", [Line])] end; +format_mfa([{M, F, A}, _]) -> + %% this kind of weird stacktrace can be generated by a uncaught throw in a gen_server + format_mfa({M, F, A}); format_mfa([{M, F, A, Props}, _]) when is_list(Props) -> %% this kind of weird stacktrace can be generated by a uncaught throw in a gen_server format_mfa({M, F, A, Props}); diff --git a/test/crash.erl b/test/crash.erl index 1c22a39..e81b53c 100644 --- a/test/crash.erl +++ b/test/crash.erl @@ -85,7 +85,7 @@ handle_call(badarity, _, State) -> F = fun(A, B, C) -> A + B + C end, Res = F(State), {reply, Res, State}; -handle_call(throw, _, State) -> +handle_call(throw, _, _State) -> throw(a_ball); handle_call(_Call, _From, State) -> {reply, ok, State}.