aboutsummaryrefslogtreecommitdiffstats
path: root/src/rlx_release.erl
diff options
context:
space:
mode:
authorTristan Sloughter <[email protected]>2014-10-22 21:16:55 -0500
committerTristan Sloughter <[email protected]>2014-10-23 11:16:36 -0500
commit04ea67a7eded3cc296e27ce1a9ae766a638035df (patch)
tree5f375f981e537a332024f0d60901d9296676a0de /src/rlx_release.erl
parentc3b538199f387a536812fcaf57ccc46de48e88e9 (diff)
downloadrelx-04ea67a7eded3cc296e27ce1a9ae766a638035df.tar.gz
relx-04ea67a7eded3cc296e27ce1a9ae766a638035df.tar.bz2
relx-04ea67a7eded3cc296e27ce1a9ae766a638035df.zip
use providers PRV_ERROR and format_error/2
Diffstat (limited to 'src/rlx_release.erl')
-rw-r--r--src/rlx_release.erl14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/rlx_release.erl b/src/rlx_release.erl
index 1d333bf..7b82119 100644
--- a/src/rlx_release.erl
+++ b/src/rlx_release.erl
@@ -41,7 +41,7 @@
canonical_name/1,
format/1,
format/2,
- format_error/1]).
+ format_error/2]).
-export_type([t/0,
name/0,
@@ -217,14 +217,14 @@ format_goal({Constraint, AppType, AppInc}) ->
format_goal(Constraint) ->
rlx_depsolver:format_constraint(Constraint).
--spec format_error(Reason::term()) -> iolist().
-format_error({topo_error, E}) ->
- rlx_topo:format_error(E);
-format_error({failed_to_parse, Con}) ->
+-spec format_error(Reason::term(), rlx_state:t()) -> iolist().
+format_error({topo_error, E}, State) ->
+ rlx_topo:format_error(E, State);
+format_error({failed_to_parse, Con}, _) ->
io_lib:format("Failed to parse constraint ~p", [Con]);
-format_error({invalid_constraint, _, Con}) ->
+format_error({invalid_constraint, _, Con}, _) ->
io_lib:format("Invalid constraint specified ~p", [Con]);
-format_error({not_realized, Name, Vsn}) ->
+format_error({not_realized, Name, Vsn}, _) ->
io_lib:format("Unable to produce metadata release: ~p-~s has not been realized",
[Name, Vsn]).