diff options
author | Torben Hoffmann <[email protected]> | 2013-08-09 00:07:11 +0400 |
---|---|---|
committer | Torben Hoffmann <[email protected]> | 2013-08-09 00:07:11 +0400 |
commit | 56d3c8191b35f1bec9fc446e62f15c6098e78f4e (patch) | |
tree | 8129393b3d6c6c30b3fdebb7b7b0902618981f61 /src | |
parent | 552ce1d5e76a9064881595353cf51460917323fb (diff) | |
download | relx-56d3c8191b35f1bec9fc446e62f15c6098e78f4e.tar.gz relx-56d3c8191b35f1bec9fc446e62f15c6098e78f4e.tar.bz2 relx-56d3c8191b35f1bec9fc446e62f15c6098e78f4e.zip |
Make unrolling of nested errors work
Some of the data sent to rlx_rel_discovery:format_error/2 had to be
unrolled more times, so the format_details/1 function has been
modified to unroll tuple of the {Module, Reason} format.
Diffstat (limited to 'src')
-rw-r--r-- | src/rlx_rel_discovery.erl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rlx_rel_discovery.erl b/src/rlx_rel_discovery.erl index 53b329f..c1e74fb 100644 --- a/src/rlx_rel_discovery.erl +++ b/src/rlx_rel_discovery.erl @@ -89,7 +89,10 @@ resolve_rel_metadata(State, LibDirs, AppMeta) -> format_detail({accessing, File, eaccess}) -> io_lib:format("permission denied accessing file ~s", [File]); format_detail({accessing, File, Type}) -> - io_lib:format("error (~p) accessing file ~s", [Type, File]). + io_lib:format("error (~p) accessing file ~s", [Type, File]); +format_detail({Module,Reason}) -> + io_lib:format("~s~n", [Module:format_error(Reason)]). + -spec discover_dir(file:name(), [rlx_app_info:t()], directory | file) -> {ok, rlx_release:t()} |