diff options
-rw-r--r-- | src/rebar_prv_install_deps.erl | 4 | ||||
-rw-r--r-- | src/rebar_prv_update.erl | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/rebar_prv_install_deps.erl b/src/rebar_prv_install_deps.erl index 48402da..59acb54 100644 --- a/src/rebar_prv_install_deps.erl +++ b/src/rebar_prv_install_deps.erl @@ -97,6 +97,8 @@ do(State) -> end. -spec format_error(any()) -> iolist(). +format_error({bad_constraint, Name, Constraint}) -> + io_lib:format("Unable to parse version for package ~s: ~s", [Name, Constraint]); format_error({parse_dep, Dep}) -> io_lib:format("Failed parsing dep ~p", [Dep]); format_error({missing_package, Package, Version}) -> @@ -510,7 +512,7 @@ parse_goal(Name, Constraint) -> {match, [Op, Vsn]} -> {Name, Vsn, binary_to_atom(Op, utf8)}; nomatch -> - fail + throw(?PRV_ERROR({bad_constraint, Name, Constraint})) end. warn_skip_deps(AppInfo, State) -> diff --git a/src/rebar_prv_update.erl b/src/rebar_prv_update.erl index e851f7b..170c591 100644 --- a/src/rebar_prv_update.erl +++ b/src/rebar_prv_update.erl @@ -49,7 +49,7 @@ do(State) -> ok catch _E:_C -> - ?PRV_ERROR(package_index_write) + throw(?PRV_ERROR(package_index_write)) end, {ok, State}. |