diff options
author | Matthias Radestock <matthias@lshift.net> | 2009-09-30 21:26:56 +0100 |
---|---|---|
committer | Matthias Radestock <matthias@lshift.net> | 2009-09-30 21:26:56 +0100 |
commit | d1b33ecf9a708b4d09cac871f471d6b58c90f1c3 (patch) | |
tree | 232199dba40dcd3bf6cd1718b182f14e377ea667 /src/rabbit.erl | |
parent | 8857b55e46506c13386c3f13f6c3f3b6b942a876 (diff) | |
download | rabbitmq-server-d1b33ecf9a708b4d09cac871f471d6b58c90f1c3.tar.gz |
leave error reporting in rabbit:prepare to contextbug21669
also:
- tabs->spaces
- a few cosmetic changes
- extract error handling & termination in rabbit_plugin_activator
Diffstat (limited to 'src/rabbit.erl')
-rw-r--r-- | src/rabbit.erl | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl index d4542a1e..cac64cb4 100644 --- a/src/rabbit.erl +++ b/src/rabbit.erl @@ -57,9 +57,9 @@ -type(log_location() :: 'tty' | 'undefined' | string()). -type(file_suffix() :: binary()). +-spec(prepare/0 :: () -> 'ok'). -spec(start/0 :: () -> 'ok'). -spec(stop/0 :: () -> 'ok'). --spec(prepare/0 :: () -> 'ok'). -spec(stop_and_halt/0 :: () -> 'ok'). -spec(rotate_logs/1 :: (file_suffix()) -> 'ok' | {'error', any()}). -spec(status/0 :: () -> @@ -73,19 +73,13 @@ %%---------------------------------------------------------------------------- prepare() -> - try - ok = ensure_working_log_handlers(), - ok = rabbit_mnesia:ensure_mnesia_dir() - catch - {error, Reason} -> - io:format("Failed to prepare Rabbit: ~p~n", [Reason]), - halt(1) - end. + ok = ensure_working_log_handlers(), + ok = rabbit_mnesia:ensure_mnesia_dir(). start() -> try - prepare(), - rabbit_misc:start_applications(?APPS) + ok = prepare(), + ok = rabbit_misc:start_applications(?APPS) after %%give the error loggers some time to catch up timer:sleep(100) |