diff options
| author | Grigory Starinkin <starinkin@gmail.com> | 2019-04-24 18:45:38 +0100 |
|---|---|---|
| committer | Grigory Starinkin <starinkin@gmail.com> | 2019-04-24 18:45:38 +0100 |
| commit | 531de0db9c2bc9301f7dbb835447bd53c0e25345 (patch) | |
| tree | ea5c47a5205eb300c46ed794fe0c14d2069f6ff8 /src/rabbit.erl | |
| parent | 314b6448caef8bdba88ec9f922b02d502aa516a2 (diff) | |
| download | rabbitmq-server-git-531de0db9c2bc9301f7dbb835447bd53c0e25345.tar.gz | |
show output from cuttlefish when conf validation fails
fixes #1985
Diffstat (limited to 'src/rabbit.erl')
| -rw-r--r-- | src/rabbit.erl | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl index 09b0494ce1..926269b81a 100644 --- a/src/rabbit.erl +++ b/src/rabbit.erl @@ -320,13 +320,11 @@ ensure_config() -> case rabbit_config:validate_config_files() of ok -> ok; {error, {ErrFmt, ErrArgs}} -> - log_boot_error_and_exit(check_config_file, ErrFmt, ErrArgs) + throw({error, {check_config_file, ErrFmt, ErrArgs}}) end, case rabbit_config:prepare_and_use_config() of {error, {generation_error, Error}} -> - log_boot_error_and_exit(generate_config_file, - "~nConfig file generation failed ~s", - Error); + throw({error, {generate_config_file, Error}}); ok -> ok end. @@ -1018,11 +1016,13 @@ boot_error(_, {could_not_start, rabbit, {{timeout_waiting_for_tables, _}, _}}) - log_boot_error_and_exit( timeout_waiting_for_tables, "~n" ++ Err ++ rabbit_nodes:diagnostics(Nodes), []); -boot_error(Class, {error, {cannot_log_to_file, _, _}} = Reason) -> +boot_error(_, {error, {cannot_log_to_file, ErrFmt, ErrArgs}}) -> + log_boot_error_and_exit(check_config_file, ErrFmt, ErrArgs); +boot_error(_, {error, {generate_config_file, Error}}) -> log_boot_error_and_exit( - Reason, - "~nError description:~s", - [lager:pr_stacktrace(erlang:get_stacktrace(), {Class, Reason})]); + generate_config_file, + "~nConfig file generation failed ~s", + [Error]); boot_error(Class, Reason) -> LogLocations = log_locations(), log_boot_error_and_exit( |
