diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2012-10-16 17:22:32 +0100 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2012-10-16 17:22:32 +0100 |
commit | 5da4862faf958f1bfacc4b0a5f9326dac998afe0 (patch) | |
tree | 305b559192028531405e92a7a74620a36fb9d022 /src/rabbit_control_main.erl | |
parent | 1c53d4743ffacad14f2fb553f9f2344c0ae6579b (diff) | |
download | rabbitmq-server-5da4862faf958f1bfacc4b0a5f9326dac998afe0.tar.gz |
Fix formatted error handling as broken by Matthias in 891e659f0e77.
Diffstat (limited to 'src/rabbit_control_main.erl')
-rw-r--r-- | src/rabbit_control_main.erl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/rabbit_control_main.erl b/src/rabbit_control_main.erl index e75e1f6f..a3cbf6e5 100644 --- a/src/rabbit_control_main.erl +++ b/src/rabbit_control_main.erl @@ -170,8 +170,8 @@ start() -> {error, Reason} -> print_error("~p", [Reason]), rabbit_misc:quit(2); - {parse_error, {_Line, Mod, Err}} -> - print_error("~s", [lists:flatten(Mod:format_error(Err))]), + {error_string, Reason} -> + print_error("~s", [Reason]), rabbit_misc:quit(2); {badrpc, {'EXIT', Reason}} -> print_error("~p", [Reason]), @@ -477,12 +477,14 @@ action(eval, Node, [Expr], _Opts, _Inform) -> Node, erl_eval, exprs, [Parsed, []]), io:format("~p~n", [Value]), ok; - {error, E} -> {parse_error, E} + {error, E} -> {error_string, format_parse_error(E)} end; {error, E, _} -> - {parse_error, E} + {error_string, format_parse_error(E)} end. +format_parse_error({_Line, Mod, Err}) -> lists:flatten(Mod:format_error(Err)). + %%---------------------------------------------------------------------------- wait_for_application(Node, PidFile, Application, Inform) -> |