@@ -70,8 +70,8 @@ handle_cast(init, State = #state{config = Config0}) ->
70
70
% % rabbitmq/rabbitmq-shovel#54 for context.
71
71
gen_server2 :cast (self (), connect_dest ),
72
72
{noreply , State # state {config = Config }}
73
- catch _ : _ ->
74
- rabbit_log_shovel :error (" Shovel ~ts could not connect to source" , [human_readable_name (maps :get (name , Config0 ))]),
73
+ catch E : R ->
74
+ rabbit_log_shovel :error (" Shovel ~ts could not connect to source: ~p ~p " , [human_readable_name (maps :get (name , Config0 )), E , R ]),
75
75
{stop , shutdown , State }
76
76
end ;
77
77
handle_cast (connect_dest , State = # state {config = Config0 }) ->
@@ -80,8 +80,8 @@ handle_cast(connect_dest, State = #state{config = Config0}) ->
80
80
rabbit_log_shovel :debug (" Shovel ~ts connected to destination" , [human_readable_name (maps :get (name , Config ))]),
81
81
gen_server2 :cast (self (), init_shovel ),
82
82
{noreply , State # state {config = Config }}
83
- catch _ : _ ->
84
- rabbit_log_shovel :error (" Shovel ~ts could not connect to destination" , [human_readable_name (maps :get (name , Config0 ))]),
83
+ catch E : R ->
84
+ rabbit_log_shovel :error (" Shovel ~ts could not connect to destination: ~p ~p " , [human_readable_name (maps :get (name , Config0 )), E , R ]),
85
85
{stop , shutdown , State }
86
86
end ;
87
87
handle_cast (init_shovel , State = # state {config = Config }) ->
0 commit comments