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

TheBuzzSaw 1 Reputation point

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!"));
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

    It sounds like the answer is NO.

    0 comments No comments