Is there a way to specify a universal exception handler for SignalR client message handlers?

TheBuzzSaw 1 Reputation point
2020-11-27T16:22:53.427+00:00

I am using the C# SignalR client library, and I caused an exception inside one of my message handlers. (Oops!) I noticed that it silently abandons the handler. Is there any way to specify a general exception handler for when a given delegate fails to handle it? Or do I need to wrap each handler individually in a try-catch block?

connection.On("CreateMessage", () => throw new Exception("Oops!"));
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,249 questions
{count} votes

1 answer

Sort by: Most helpful
  1. TheBuzzSaw 1 Reputation point
    2020-12-08T16:51:38.333+00:00

    It sounds like the answer is NO.

    0 comments No comments