Better handle user exceptions

This commit is contained in:
Brandon Smith
2015-08-22 03:44:05 -03:00
parent 6b547449b8
commit c16cb31782

View File

@@ -150,7 +150,11 @@ namespace Discord
QueueMessage(new WebSocketCommands.KeepAlive());
_connectWaitOnLogin.Set(); //Pre-Event
}
RaiseGotEvent(msg.Type, msg.Payload as JToken);
try
{
RaiseGotEvent(msg.Type, msg.Payload as JToken);
}
catch { } //Don't allow user exceptions to affect our state
if (msg.Type == "READY")
_connectWaitOnLogin2.Set(); //Post-Event
break;