summaryrefslogtreecommitdiff
path: root/src/rebar_prv_app_discovery.erl
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2015-05-07 18:36:15 -0500
committerTristan Sloughter <t@crashfast.com>2015-05-07 18:36:15 -0500
commitc7281abb309283011bd2ef9cdf8da54ddd858aa1 (patch)
tree0a1fe31b0cfbb2ee0f3bdfb0fc0c7b3cb6cbc46c /src/rebar_prv_app_discovery.erl
parentb3d444ef67f91815d4ac12a393b5e905b01ebcc3 (diff)
parent3edede54e759f8494981bb2e6380b7eee437b7f3 (diff)
Merge branch 'fix_windows_bootstrap' of https://github.com/ingwinlu/rebar3 into ingwinlu-fix_windows_bootstrap
Diffstat (limited to 'src/rebar_prv_app_discovery.erl')
-rw-r--r--src/rebar_prv_app_discovery.erl8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rebar_prv_app_discovery.erl b/src/rebar_prv_app_discovery.erl
index 31c0f59..97862c1 100644
--- a/src/rebar_prv_app_discovery.erl
+++ b/src/rebar_prv_app_discovery.erl
@@ -45,5 +45,13 @@ do(State) ->
-spec format_error(any()) -> iolist().
format_error({multiple_app_files, Files}) ->
io_lib:format("Multiple app files found in one app dir: ~s", [string:join(Files, " and ")]);
+format_error({invalid_app_file, File, Reason}) ->
+ case Reason of
+ {Line, erl_parse, Description} ->
+ io_lib:format("Invalid app file ~s at line ~b: ~p",
+ [File, Line, lists:flatten(Description)]);
+ _ ->
+ io_lib:format("Invalid app file ~s: ~p", [File, Reason])
+ end;
format_error(Reason) ->
io_lib:format("~p", [Reason]).