I'm making a small chat application. I got to the point where one client sends a message, and then by using callbacks of other clients in the room, they quickly recieve the message. So, if there are 10 people in the room, the service instance of the client who is sending the message, will invoke this in 10 threads:
targetCallback.RecieveMessage(message);
Now, internet connections are volatile, and it could just so happen that it breaks a moment before that's performed, so an exception would be thrown and the client instance automatically destroyed, leaving the message unsent or half-successful.
I found examples that don't really handle those exceptions at all, while other put a simple:
try
{
targetCallback.RecieveMessage(message);
}
catch
{
}
But, is that the best way to handle this exception?