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 | bd9b004c686847f77013a360536fd5d2164d3241 (patch) | |
| tree | 232199dba40dcd3bf6cd1718b182f14e377ea667 /src/rabbit.erl | |
| parent | 39ab83503e728ed893cdb45d1d7d7143a66238a5 (diff) | |
| download | rabbitmq-server-git-bd9b004c686847f77013a360536fd5d2164d3241.tar.gz | |
leave error reporting in rabbit:prepare to context
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 d4542a1e31..cac64cb4e5 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) |
