diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_multi.erl | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/rabbit_multi.erl b/src/rabbit_multi.erl index c6a7e9200d..66a560e6dc 100644 --- a/src/rabbit_multi.erl +++ b/src/rabbit_multi.erl @@ -46,18 +46,22 @@ start() -> io:format("done.~n"), init:stop(); {'EXIT', {function_clause, [{?MODULE, action, _} | _]}} -> - io:format("Invalid command ~p~n", [FullCommand]), + error("invalid command '~s'", + [lists:flatten( + rabbit_misc:intersperse(" ", FullCommand))]), usage(); timeout -> - io:format("timeout starting some nodes.~n"), + error("timeout starting some nodes.", []), halt(1); Other -> - io:format("~nrabbit_multi action ~p failed:~n~p~n", - [Command, Other]), + error("~p", [Other]), halt(2) end end. +error(Format, Args) -> + io:format("Error: " ++ Format ++"~n", Args). + parse_args([Command | Args]) -> {list_to_atom(Command), Args}. |
