summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTuncer Ayaz <tuncer.ayaz@gmail.com>2012-05-22 19:13:41 +0200
committerTuncer Ayaz <tuncer.ayaz@gmail.com>2012-06-11 19:40:59 +0200
commit4b9fcda7ab7c2aad9fc8902613590ed7fe43967c (patch)
treeaf7662feae7669dd4d587052093b9a533d76d67a /src
parent50fbabda68fb175fb392624bc9e586ba07c09b83 (diff)
Manually format leex/yecc errors/warnings
Diffstat (limited to 'src')
-rw-r--r--src/rebar_erlc_compiler.erl9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/rebar_erlc_compiler.erl b/src/rebar_erlc_compiler.erl
index acb8491..42fecc9 100644
--- a/src/rebar_erlc_compiler.erl
+++ b/src/rebar_erlc_compiler.erl
@@ -318,11 +318,14 @@ compile_yrl(Source, Target, Config) ->
compile_xrl_yrl(Source, Target, Opts, Mod) ->
case needs_compile(Source, Target, []) of
true ->
- case Mod:file(Source, Opts) of
+ case Mod:file(Source, Opts ++ [{return, true}]) of
{ok, _} ->
ok;
- _X ->
- ?ABORT
+ {ok, _Mod, Ws} ->
+ {ok, format_errors(Source, "Warning: ", Ws)};
+ {error, Es, Ws} ->
+ {error, format_errors(Source, Es),
+ format_errors(Source, "Warning: ", Ws)}
end;
false ->
skipped