diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2010-11-15 11:25:25 +0000 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2010-11-15 11:25:25 +0000 |
commit | f6fc65d5fbae0f8b9a7715ed4cbfbe8596908c0e (patch) | |
tree | 810ca8af267df1983f8498f970d751f20a9d7132 | |
parent | ae767beac5b2a5afd909e748bc414d41aa26e38a (diff) | |
download | rabbitmq-server-f6fc65d5fbae0f8b9a7715ed4cbfbe8596908c0e.tar.gz |
Replace catch with try; we want to show all kinds of boot errors in a readable way.
-rw-r--r-- | src/rabbit.erl | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl index a1dd2c2e..983a8453 100644 --- a/src/rabbit.erl +++ b/src/rabbit.erl @@ -291,11 +291,10 @@ run_boot_step({StepName, Attributes}) -> io:format("-- ~s~n", [Description]); MFAs -> io:format("starting ~-60s ...", [Description]), - [case catch apply(M,F,A) of - {'EXIT', Reason} -> - boot_error("FAILED~nReason: ~p~n", [Reason]); - ok -> - ok + [try + apply(M,F,A) + catch + _:Reason -> boot_error("FAILED~nReason: ~p~n", [Reason]) end || {M,F,A} <- MFAs], io:format("done~n"), ok |