Skip to content

Commit 9e1f2c9

Browse files
author
Emile Joubert
committed
More consistent exception handling
1 parent 553f501 commit 9e1f2c9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

projects/client/RabbitMQ.Client/src/client/impl/ModelBase.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,10 @@ public virtual void OnFlowControl(FlowControlEventArgs args)
333333
h(this, args);
334334
}
335335
catch (Exception e)
336-
{
337-
Console.WriteLine("exception while running flow control event handler");
338-
Console.WriteLine(e + e.StackTrace);
336+
{
337+
CallbackExceptionEventArgs exnArgs = new CallbackExceptionEventArgs(e);
338+
exnArgs.Detail["context"] = "OnFlowControl";
339+
OnCallbackException(exnArgs);
339340
}
340341
}
341342
}

0 commit comments

Comments
 (0)