Last post Sep 23, 2013 02:03 PM by davidfowl
Sep 22, 2013 07:05 PM|WayneAllen|LINK
I have created a hub class that overrides the Hub class in SignalR. Additionally, I have overwritten the OnConnected method. In my OnConnected method, there is the possibility of an Exception being thrown. If the Exception is thrown, is there any way
to trap this at the client (eg. a fail callback or something similar)? Or do I need to write a custom callback to the client from the server to inform the client of the exception?
Sep 23, 2013 02:03 PM|davidfowl|LINK
Exception messages don't flow from client to server generally. If you care about specific exceptions and then you need to tell the client manually. If the client fails to connect it'll just throw a generic error. In 2.0 there's a feature in hubs that lets
you flow specific errors to the client (you can throw a HubException).