Commit 6f5bfed0 authored by Andrew Thompson's avatar Andrew Thompson
Browse files

Merge pull request #254 from Vagabond/adt-badarg-stacktrace

Improve format_reason for certain oddly formed badarg stacktraces
Showing with 2 additions and 0 deletions
+2 -0
......@@ -353,6 +353,8 @@ format_reason({badarg, [MFA,MFA2|_]}) ->
%% seems to be generated by a bad call to a BIF
["bad argument in ", format_mfa(MFA)]
end;
format_reason({{badarg, Stack}, _}) ->
format_reason({badarg, Stack});
format_reason({{badarity, {Fun, Args}}, [MFA|_]}) ->
{arity, Arity} = lists:keyfind(arity, 1, erlang:fun_info(Fun)),
[io_lib:format("fun called with wrong arity of ~w instead of ~w in ",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment