From c3b538199f387a536812fcaf57ccc46de48e88e9 Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Wed, 22 Oct 2014 19:00:19 -0500 Subject: include state in format_error/2 --- src/rlx_prv_relup.erl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/rlx_prv_relup.erl') diff --git a/src/rlx_prv_relup.erl b/src/rlx_prv_relup.erl index bc86304..3564dd0 100644 --- a/src/rlx_prv_relup.erl +++ b/src/rlx_prv_relup.erl @@ -26,7 +26,7 @@ -export([init/1, do/1, - format_error/1]). + format_error/2]). -include("relx.hrl"). @@ -55,22 +55,22 @@ do(State) -> Release0 = rlx_state:get_realized_release(State, RelName, RelVsn), make_relup(State, Release0). -format_error({relup_generation_error, CurrentName, UpFromName}) -> +format_error({relup_generation_error, CurrentName, UpFromName}, _) -> io_lib:format("Unknown internal release error generating the relup from ~s to ~s", [UpFromName, CurrentName]); -format_error({relup_generation_warning, Module, Warnings}) -> +format_error({relup_generation_warning, Module, Warnings}, _) -> ["Warnings generating relup \s", rlx_util:indent(2), Module:format_warning(Warnings)]; -format_error({no_upfrom_release_found, undefined}) -> +format_error({no_upfrom_release_found, undefined}, _) -> io_lib:format("No earlier release for relup found", []); -format_error({no_upfrom_release_found, Vsn}) -> +format_error({no_upfrom_release_found, Vsn}, _) -> io_lib:format("Upfrom release version (~s) for relup not found", [Vsn]); format_error({relup_script_generation_error, {relup_script_generation_error, systools_relup, - {missing_sasl, _}}}) -> + {missing_sasl, _}}}, _) -> "Unfortunately, due to requirements in systools, you need to have the sasl application " "in both the current release and the release to upgrade from."; -format_error({relup_script_generation_error, Module, Errors}) -> +format_error({relup_script_generation_error, Module, Errors}, _) -> ["Errors generating relup \n", rlx_util:indent(2), Module:format_error(Errors)]. -- cgit v1.2.3