@@ -281,17 +281,16 @@ sync_transient_binding(Binding, Fun) ->
281
281
call_with_source_and_destination (SrcName , DstName , Fun ) ->
282
282
SrcTable = table_for_resource (SrcName ),
283
283
DstTable = table_for_resource (DstName ),
284
- ErrFun = fun (Err ) -> rabbit_misc :const (Err ) end ,
284
+ ErrFun = fun (Err ) -> rabbit_misc :const ({ error , Err } ) end ,
285
285
rabbit_misc :execute_mnesia_tx_with_tail (
286
286
fun () ->
287
287
case {mnesia :read ({SrcTable , SrcName }),
288
288
mnesia :read ({DstTable , DstName })} of
289
289
{[Src ], [Dst ]} -> Fun (Src , Dst );
290
- {[], [_ ] } -> ErrFun ({error , source_not_found });
291
- {[_ ], [] } -> ErrFun ({error , destination_not_found });
292
- {[], [] } -> ErrFun ({error ,
293
- source_and_destination_not_found })
294
- end
290
+ {[], [_ ] } -> ErrFun (source_not_found );
291
+ {[_ ], [] } -> ErrFun (destination_not_found );
292
+ {[], [] } -> ErrFun (source_and_destination_not_found )
293
+ end
295
294
end ).
296
295
297
296
table_for_resource (# resource {kind = exchange }) -> rabbit_exchange ;
0 commit comments