void client_Error(object sender, XmppErrorEventArgs e) { string uiMessage; switch (e.Type) { case XmppErrorType.SocketError: uiMessage = "Unable to contact server. "; break; case XmppErrorType.AuthUserNotAuthorized: uiMessage = "Unauthorized. Probably the username and password you entered are incorrect. "; break; case XmppErrorType.AuthModeNotSupported: uiMessage = "Unable to authenticate: no methods available. "; break; case XmppErrorType.ClientNotConnected: uiMessage = "Hey you're not connected :-( "; break; case XmppErrorType.RecvTooManyInvalidStream: uiMessage = "Ouch ouch ouch stream was messed up :-( "; break; case XmppErrorType.ConnectionClosedByServer: uiMessage = "Ouch ouch ouch server closed stream, end of games :-( "; break; case XmppErrorType.SocketStartSSLError: uiMessage = "Ouch ouch ouch SSL was messed up :-( "; break; case XmppErrorType.XmppStreamError: uiMessage = "Ohu nooo I've received a stream error for you :-( "; break; default: uiMessage = "Unknown error :-( Something has happened ... "; break; } if (!string.IsNullOrWhiteSpace(e.ErrorDescriptor)) { uiMessage += Environment.NewLine + Environment.NewLine + e.ErrorDescriptor; } if (!string.IsNullOrWhiteSpace(e.Message)) { uiMessage += Environment.NewLine + Environment.NewLine + e.Message; } DialogUtils.ShowError(this, uiMessage); Disconnect(); }
private void xmppControl_OnError(object sender, XmppErrorEventArgs e) { Console.WriteLine("IM-Error:" + "(" + e.ErrorCode + ")" + e.Description); }