diff options
Diffstat (limited to 'src/rebar_fetch.erl')
-rw-r--r-- | src/rebar_fetch.erl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/rebar_fetch.erl b/src/rebar_fetch.erl index a1b3476..eac2d02 100644 --- a/src/rebar_fetch.erl +++ b/src/rebar_fetch.erl @@ -11,6 +11,8 @@ download_source/2, needs_update/2]). +-export([format_error/1]). + -include("rebar.hrl"). %% map short versions of resources to module names @@ -47,8 +49,8 @@ download_source(AppDir, Source) -> true end catch - _:E -> - {error, E} + _:_ -> + {error, {rebar_fetch, {fetch_fail, Source}}} end. -spec needs_update(file:filename_all(), rebar_resource:resource()) -> boolean() | {error, string()}. @@ -61,6 +63,9 @@ needs_update(AppDir, Source) -> true end. +format_error({fetch_fail, Source}) -> + io_lib:format("Failed to fetch and copy dep: ~p", [Source]). + get_resource_type({Type, Location}) -> find_resource_module(Type, Location); get_resource_type({Type, Location, _}) -> |