summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2014-07-28 15:52:43 +0100
committerSimon MacMullen <simon@rabbitmq.com>2014-07-28 15:52:43 +0100
commit336829b314c1cd8e1460bec1ada626e7815e009e (patch)
tree48fd98b3145483de514c69de6d06dc95f8134b3c
parent3a4dc20f637c715b6b8edbf064e6fc3d7017be90 (diff)
downloadrabbitmq-server-336829b314c1cd8e1460bec1ada626e7815e009e.tar.gz
Nicer formatting of error message.bug26242
-rw-r--r--src/rabbit_control_main.erl10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rabbit_control_main.erl b/src/rabbit_control_main.erl
index 4f5a766c..61596d45 100644
--- a/src/rabbit_control_main.erl
+++ b/src/rabbit_control_main.erl
@@ -732,11 +732,11 @@ unsafe_rpc(Node, Mod, Fun, Args) ->
ensure_app_running(Node) ->
case call(Node, {rabbit, is_running, []}) of
true -> ok;
- false -> fmt_stderr("rabbit app is not running on node ~s, "
- "please start it with rabbitmqctl start_app "
- "and try again",
- [Node]),
- rabbit_misc:quit(2);
+ false -> {error_string,
+ rabbit_misc:format(
+ "rabbit application is not running on node ~s.~n"
+ " * Suggestion: start it with \"rabbitmqctl start_app\" "
+ "and try again", [Node])};
Other -> Other
end.