mirror of
https://github.com/correl/rebar.git
synced 2024-12-18 03:00:17 +00:00
Add support for {Line,Column} in error reports
This commit is contained in:
parent
c3fc279ff9
commit
0716cf708c
1 changed files with 4 additions and 1 deletions
|
@ -234,6 +234,9 @@ format_errors(Source, Extra, Errors) ->
|
||||||
[lists:append([format_error(AbsSource, Extra, Desc) || Desc <- Descs])
|
[lists:append([format_error(AbsSource, Extra, Desc) || Desc <- Descs])
|
||||||
|| {_, Descs} <- Errors].
|
|| {_, Descs} <- Errors].
|
||||||
|
|
||||||
|
format_error(AbsSource, Extra, {{Line, Column}, Mod, Desc}) ->
|
||||||
|
ErrorDesc = Mod:format_error(Desc),
|
||||||
|
?FMT("~s:~w:~w: ~s~s", [AbsSource, Line, Column, Extra, ErrorDesc]);
|
||||||
format_error(AbsSource, Extra, {Line, Mod, Desc}) ->
|
format_error(AbsSource, Extra, {Line, Mod, Desc}) ->
|
||||||
ErrorDesc = Mod:format_error(Desc),
|
ErrorDesc = Mod:format_error(Desc),
|
||||||
?FMT("~s:~b: ~s~s", [AbsSource, Line, Extra, ErrorDesc]).
|
?FMT("~s:~w: ~s~s", [AbsSource, Line, Extra, ErrorDesc]).
|
||||||
|
|
Loading…
Reference in a new issue