diff options
author | Tristan Sloughter <[email protected]> | 2014-10-22 19:00:19 -0500 |
---|---|---|
committer | Tristan Sloughter <[email protected]> | 2014-10-22 19:00:19 -0500 |
commit | c3b538199f387a536812fcaf57ccc46de48e88e9 (patch) | |
tree | d388a9aca95fd775d0ce348c3cdbd8d6c44086c9 /src/rlx_prv_assembler.erl | |
parent | 11fa012cdaea031c1fea34bcad49b6c6cbe2eedf (diff) | |
download | relx-c3b538199f387a536812fcaf57ccc46de48e88e9.tar.gz relx-c3b538199f387a536812fcaf57ccc46de48e88e9.tar.bz2 relx-c3b538199f387a536812fcaf57ccc46de48e88e9.zip |
include state in format_error/2
Diffstat (limited to 'src/rlx_prv_assembler.erl')
-rw-r--r-- | src/rlx_prv_assembler.erl | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/rlx_prv_assembler.erl b/src/rlx_prv_assembler.erl index 8a25cdd..7ef655b 100644 --- a/src/rlx_prv_assembler.erl +++ b/src/rlx_prv_assembler.erl @@ -26,7 +26,7 @@ -export([init/1, do/1, - format_error/1]). + format_error/2]). -include("relx.hrl"). @@ -68,31 +68,31 @@ do(State) -> Error end. --spec format_error(ErrorDetail::term()) -> iolist(). -format_error({unresolved_release, RelName, RelVsn}) -> +-spec format_error(ErrorDetail::term(), rlx_state:t()) -> iolist(). +format_error({unresolved_release, RelName, RelVsn}, _) -> io_lib:format("The release has not been resolved ~p-~s", [RelName, RelVsn]); -format_error({ec_file_error, AppDir, TargetDir, E}) -> +format_error({ec_file_error, AppDir, TargetDir, E}, _) -> io_lib:format("Unable to copy OTP App from ~s to ~s due to ~p", [AppDir, TargetDir, E]); -format_error({config_does_not_exist, Path}) -> +format_error({config_does_not_exist, Path}, _) -> io_lib:format("The config file specified for this release (~s) does not exist!", [Path]); -format_error({specified_erts_does_not_exist, ErtsVersion}) -> +format_error({specified_erts_does_not_exist, ErtsVersion}, _) -> io_lib:format("Specified version of erts (~s) does not exist", [ErtsVersion]); -format_error({release_script_generation_error, RelFile}) -> +format_error({release_script_generation_error, RelFile}, _) -> io_lib:format("Unknown internal release error generating the release file to ~s", [RelFile]); -format_error({release_script_generation_warning, Module, Warnings}) -> +format_error({release_script_generation_warning, Module, Warnings}, _) -> ["Warnings generating release \s", rlx_util:indent(2), Module:format_warning(Warnings)]; -format_error({unable_to_create_output_dir, OutputDir}) -> +format_error({unable_to_create_output_dir, OutputDir}, _) -> io_lib:format("Unable to create output directory (possible permissions issue): ~s", [OutputDir]); -format_error({release_script_generation_error, Module, Errors}) -> +format_error({release_script_generation_error, Module, Errors}, _) -> ["Errors generating release \n", rlx_util:indent(2), Module:format_error(Errors)]; -format_error({unable_to_make_symlink, AppDir, TargetDir, Reason}) -> +format_error({unable_to_make_symlink, AppDir, TargetDir, Reason}, _) -> io_lib:format("Unable to symlink directory ~s to ~s because \n~s~s", [AppDir, TargetDir, rlx_util:indent(2), file:format_error(Reason)]). |