@@ -320,13 +320,11 @@ ensure_config() ->
320320    case  rabbit_config :validate_config_files () of 
321321        ok  -> ok ;
322322        {error , {ErrFmt , ErrArgs }} ->
323-             log_boot_error_and_exit ( check_config_file , ErrFmt , ErrArgs )
323+             throw ({ error , { check_config_file , ErrFmt , ErrArgs }} )
324324    end ,
325325    case  rabbit_config :prepare_and_use_config () of 
326326        {error , {generation_error , Error }} ->
327-             log_boot_error_and_exit (generate_config_file ,
328-                                     " ~n Config file generation failed ~s " 
329-                                     Error );
327+             throw ({error , {generate_config_file , Error }});
330328        ok  -> ok 
331329    end .
332330
@@ -1018,11 +1016,13 @@ boot_error(_, {could_not_start, rabbit, {{timeout_waiting_for_tables, _}, _}}) -
10181016    log_boot_error_and_exit (
10191017      timeout_waiting_for_tables ,
10201018      " ~n " ++  Err  ++  rabbit_nodes :diagnostics (Nodes ), []);
1021- boot_error (Class , {error , {cannot_log_to_file , _ , _ }} =  Reason ) -> 
1019+ boot_error (_ , {error , {cannot_log_to_file , ErrFmt , ErrArgs }}) -> 
1020+     log_boot_error_and_exit (check_config_file , ErrFmt , ErrArgs );
1021+ boot_error (_ , {error , {generate_config_file , Error }}) -> 
10221022    log_boot_error_and_exit (
1023-       Reason ,
1024-       " ~n  Error description: ~s " 
1025-       [lager : pr_stacktrace ( erlang : get_stacktrace (), { Class ,  Reason }) ]);
1023+       generate_config_file ,
1024+       " ~n  Config file generation failed  ~s " 
1025+       [Error ]);
10261026boot_error (Class , Reason ) -> 
10271027    LogLocations  =  log_locations (),
10281028    log_boot_error_and_exit (
0 commit comments