summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTuncer Ayaz <tuncer.ayaz@gmail.com>2012-06-05 20:54:05 +0200
committerTuncer Ayaz <tuncer.ayaz@gmail.com>2012-06-11 19:42:00 +0200
commit0716cf708ca3d3d61d2435b88e6d68410a49db6e (patch)
tree486250515dcf1f082396283228bf30791242e582 /src
parentc3fc279ff9b4620fd101de12f89bd4343575c69b (diff)
Add support for {Line,Column} in error reports
Diffstat (limited to 'src')
-rw-r--r--src/rebar_base_compiler.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rebar_base_compiler.erl b/src/rebar_base_compiler.erl
index 3750e5b..dacb44d 100644
--- a/src/rebar_base_compiler.erl
+++ b/src/rebar_base_compiler.erl
@@ -234,6 +234,9 @@ format_errors(Source, Extra, Errors) ->
[lists:append([format_error(AbsSource, Extra, Desc) || Desc <- Descs])
|| {_, 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}) ->
ErrorDesc = Mod:format_error(Desc),
- ?FMT("~s:~b: ~s~s", [AbsSource, Line, Extra, ErrorDesc]).
+ ?FMT("~s:~w: ~s~s", [AbsSource, Line, Extra, ErrorDesc]).