Skip to content

Commit

Permalink
Intial support for R15 line numbers in errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Vagabond committed Mar 31, 2012
1 parent efc7b75 commit 68065c1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/error_logger_lager_h.erl
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,13 @@ format_mfa({M, F, A}) when is_list(A) ->
io_lib:format("~w:~w("++FmtStr++")", [M, F | Args]);
format_mfa({M, F, A}) when is_integer(A) ->
io_lib:format("~w:~w/~w", [M, F, A]);
format_mfa({M, F, A, Props}) when is_list(Props) ->
case {proplists:get_value(file, Props), proplists:get_value(line, Props)} of
{undefined, undefined} ->
format_mfa({M, F, A});
{File, Line} ->
[format_mfa({M, F, A}), io_lib:format(" (~s:~w)", [File, Line])]
end;
format_mfa(Other) ->
io_lib:format("~w", [Other]).

Expand Down

0 comments on commit 68065c1

Please sign in to comment.