From 56d3c8191b35f1bec9fc446e62f15c6098e78f4e Mon Sep 17 00:00:00 2001
From: Torben Hoffmann
Date: Fri, 9 Aug 2013 00:07:11 +0400
Subject: 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.
---
src/rlx_rel_discovery.erl | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
(limited to 'src')
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()}
--
cgit v1.2.3
|