private void PushChannel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { if (System.Diagnostics.Debugger.IsAttached) { System.Diagnostics.Debugger.Break(); } }
void pushChannel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { Dispatcher.BeginInvoke(() => System.Diagnostics.Debug.WriteLine(String.Format("A push notification {0} error occurred. {1} ({2}) {3}", e.ErrorType, e.Message, e.ErrorCode, e.ErrorAdditionalData)) ); }
private void CanalPush_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { Dispatcher.BeginInvoke(() => MessageBox.Show(String.Format("A push notification {0} error occurred. {1} ({2}) {3}", e.ErrorType, e.Message, e.ErrorCode, e.ErrorAdditionalData)) ); }
private void PushChannel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { Dispatcher.BeginInvoke(() => MessageBox.Show(String.Format("A push notification {0} error occurred. {1} ({2}) {3}", e.ErrorType, e.Message, e.ErrorCode, e.ErrorAdditionalData)) ); }
/// <summary> /// Event handler for the ErrorOccurred event. /// Handles different events according to ErrorType. /// </summary> /// <remarks> /// Needs more work... ;-( /// </remarks> /// <param name="sender"></param> /// <param name="e"></param> void channel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { switch (e.ErrorType) { // something went severely wrong. lets wait a while before trying again. case ChannelErrorType.ChannelOpenFailed: DisposeChannel(); System.Threading.Thread.Sleep(60000); BindChannel(); break; // an image uri has been referenced in a notification that was // not bound to the shell tile. case ChannelErrorType.MessageBadContent: break; // too many notifications have been received in too short a time span. case ChannelErrorType.NotificationRateTooHigh: break; // a bad payload was received. re-establish the connection to overcome this. case ChannelErrorType.PayloadFormatError: DisposeChannel(); BindChannel(); break; // the type notifications we're receiving is going to change. case ChannelErrorType.PowerLevelChanged: break; default: break; } }
void NotificationService_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { FSLog.Error("Push notification error {0} occured. {1} {2} {3}", e.ErrorType, e.Message, e.ErrorCode, e.ErrorAdditionalData); Stop(); Start(); }
void httpChannel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { Dispatcher.BeginInvoke(() => { msg.Text = e.Message; }); }
private void OnChannelErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { System.Diagnostics.Debug.WriteLine("Channel error happened! " + e.ErrorType); switch (e.ErrorType) { case ChannelErrorType.ChannelOpenFailed: // ... break; case ChannelErrorType.MessageBadContent: // ... break; case ChannelErrorType.NotificationRateTooHigh: // ... break; case ChannelErrorType.PayloadFormatError: // ... break; case ChannelErrorType.PowerLevelChanged: // ... break; } }
void OnChannelErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { bool reOpenConnection = e.ErrorType == ChannelErrorType.ChannelOpenFailed || e.ErrorType == ChannelErrorType.PayloadFormatError; var currentChannel = sender as HttpNotificationChannel; if (reOpenConnection == true) { lock (_syncRoot) { if (currentChannel == _channel) { _channel = CreateNewChannel(); CloseChannel(currentChannel); } } } AppContext.Debug.LogAsync(string.Format("Channel error- type:{0}, errorCode:{1}, message:{2}, addlData:{3}", e.ErrorType, e.ErrorCode, e.Message, e.ErrorAdditionalData )); }
void myChannel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { switch (e.ErrorType) { case ChannelErrorType.ChannelOpenFailed: // ... break; case ChannelErrorType.MessageBadContent: // ... break; case ChannelErrorType.NotificationRateTooHigh: // ... break; case ChannelErrorType.PayloadFormatError: // ... break; case ChannelErrorType.PowerLevelChanged: // ... break; } }
void PushChannel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { // Error handling logic //Dispatcher.BeginInvoke(() => // MessageBox.Show(String.Format("A push notification {0} error occurred. {1} ({2}) {3}", // e.ErrorType, e.Message, e.ErrorCode, e.ErrorAdditionalData)) // ); }
void httpChannel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { //子线程中更新UI Dispatcher.BeginInvoke(() => { // msgTextBlock.Text = e.Message; }); }
private void PushChannel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { // Error handling logic for your particular application would be here. if (Error != null) { Error(e); } }
private void PushChannel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { Deployment.Current.Dispatcher.BeginInvoke(new Action(() => { MessageBox.Show(String.Format("A push notification {0} error occurred. {1} ({2}) {3}", e.ErrorType, e.Message, e.ErrorCode, e.ErrorAdditionalData)); })); }
/// <summary> /// The callback for a channel error. /// </summary> private void httpChannel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { console.AddLine("Error occurred: " + e.Message); console.AddLine("Trying to reopen channel."); httpChannel.Close(); httpChannel.Open(); }
void PushChannel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { // Error handling logic for your particular application would be here. Dispatcher.BeginInvoke(() => MessageBox.Show(String.Format("A push notification {0} error occurred. {1} ({2}) {3}", e.ErrorType, e.Message, e.ErrorCode, e.ErrorAdditionalData)) ); }
private void PushChannel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { Dispatcher.BeginInvoke(() => { System.Diagnostics.Debug.WriteLine(String.Format("A push notification {0} error occurred. {1} ({2}) {3}", e.ErrorType, e.Message, e.ErrorCode, e.ErrorAdditionalData)); }); }
void PushChannel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { // call error handler and return uri RegisterError err = new RegisterError(); err.Code = e.ErrorCode.ToString(); err.Message = e.Message; this.DispatchCommandResult(new PluginResult(PluginResult.Status.ERROR, err)); }
static void channel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { SafeDispatcher.Run(() => { new ToastPrompt { Message = e.Message }.Show(); new ToastPrompt { Message = e.ErrorType.ToString() }.Show(); }); }
private void OnErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { var message = string.Format("A push notification {0} error occurred. {1} ({2}) {3}", e.ErrorType, e.Message, e.ErrorCode, e.ErrorAdditionalData); Execute.ShowDebugMessage(message); TLUtils.WriteLine(message); LoadOrCreateChannelAsync(RegisterDeviceAsync); }
void httpChannel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { if (e.ErrorType == ChannelErrorType.ChannelOpenFailed) { } Dispatcher.BeginInvoke(() => msgTextBlock.Text = e.Message); }
void _channel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { if (ErrorOccurred != null) { ErrorOccurred(sender, e); } Debug.WriteLine(e.ErrorCode.ToString()); //MessageBox.Show(e.ErrorCode.ToString()); }
private void Channel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { if (OnPushTokenFailed != null) { OnPushTokenFailed(this, e.Message); } Debug.WriteLine("/********************************************************/"); Debug.WriteLine("A push notification {0} error occurred. {1} ({2}) {3}", e.ErrorType, e.Message, e.ErrorCode, e.ErrorAdditionalData); }
void PushChannel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { // call error handler and return uri RegisterError err = new RegisterError { Code = e.ErrorCode.ToString(), Message = e.Message }; SendError(JsonConvert.SerializeObject(err)); }
private void OnErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { #if DEBUG Debug.WriteLine("Received error on push channel: " + e.Message); #endif PluginResult result = new PluginResult(PluginResult.Status.ERROR, e.Message); result.KeepCallback = false; parent.DispatchCommandResult(result, callbackId); }
private void PushChannelErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { Deployment.Current.Dispatcher.BeginInvoke(() => { var toast = new ToastPrompt { Title = "Push error occurred", Message = e.Message }; toast.Show(); }); System.Diagnostics.Debug.WriteLine("Error: {0},{1}", e.ErrorType, e.Message); }
private void ErrorOccurred( object sender, NotificationChannelErrorEventArgs args) { if (Error != null) { Error(this, new NotificationErrorEventArgs { Message = string.Format("{0}: {1}", args.ErrorType, args.Message) }); } }
void PushChannel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { // call error handler and return uri var err = new RegisterError { Code = e.ErrorCode.ToString(), Message = e.Message }; this.ExecuteCallback(this.pushOptions.ErrorCallback, JsonConvert.SerializeObject(err)); }
void PushChannelErrorOccurred (object sender, NotificationChannelErrorEventArgs e) { Dispatcher.BeginInvoke(() => MessageBox.Show( String.Format( @"Ein Push- Notification {0} Fehler ist aufgretreten. {1} {2} {3}", e.ErrorType, e.ErrorCode, e.ErrorAdditionalData)) ); }
private void PushChannel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { Logger.Instance.Error(string.Format("A push notification {0} error occurred. {1} ({2}) {3}", e.ErrorType, e.Message, e.ErrorCode, e.ErrorAdditionalData)); if (e.ErrorType == ChannelErrorType.ChannelOpenFailed && this._retryTries <= 3) { this._retryTries = this._retryTries + 1; this.OpenChannel(); } if (e.ErrorType != ChannelErrorType.PayloadFormatError || this._retryTries > 3) { return; } this._retryTries = this._retryTries + 1; this.OpenChannel(); }
/// <summary> /// Event handler for when a push notification error occurs. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void PushChannel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { String ErrorMessage = String.Format("A push notification {0} error occurred. {1} ({2}) {3}", e.ErrorType, e.Message, e.ErrorCode, e.ErrorAdditionalData); Deployment.Current.Dispatcher.BeginInvoke(() => { System.Diagnostics.Debug.WriteLine(ErrorMessage); }); Deployment.Current.Dispatcher.BeginInvoke(new PushServiceRegistrationCallback(mRegistrationCallback), ErrorMessage, true); // Error handling logic for your particular application would be here. //Dispatcher.BeginInvoke(() => // MessageBox.Show(String.Format("A push notification {0} error occurred. {1} ({2}) {3}", // e.ErrorType, e.Message, e.ErrorCode, e.ErrorAdditionalData)) // ); }
void OnChannelErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { bool reOpenConnection = e.ErrorType == ChannelErrorType.ChannelOpenFailed || e.ErrorType == ChannelErrorType.PayloadFormatError; var currentChannel = sender as HttpNotificationChannel; if (reOpenConnection == true) { lock (_syncRoot) { if (currentChannel == _channel) { _channel = CreateNewChannel(); CloseChannel(currentChannel); } } } #pragma warning disable 4014 AppContext.Debug.LogAsync(string.Format("Channel error- type:{0}, errorCode:{1}, message:{2}, addlData:{3}", e.ErrorType, e.ErrorCode, e.Message, e.ErrorAdditionalData )); #pragma warning restore 4014 }
void httpChannel_ExceptionOccurred(object sender, NotificationChannelErrorEventArgs e) { Dispatcher.BeginInvoke(() => UpdateStatus(e.ErrorType + " occurred: " + e.Message)); }
private void PushChannel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { Debug.WriteLine("[Linphone] Push channel error {0}", e.Message); }
void pushChannel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { MessageBox.Show(e.Message); }
private void ErrorOccurred( object sender, NotificationChannelErrorEventArgs args) { if(Error != null) Error(this, new NotificationErrorEventArgs { Message = string.Format("{0}: {1}", args.ErrorType, args.Message) }); }
void uriChannel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { txBlock_Notificacion.Text = "Obteniendo UriChannel MPNS..."; abrirCanalMPNS(); }
void channel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { //System.Diagnostics.Debug.WriteLine(e.GetType().Name + ": " + e.Message); Dispatcher.BeginInvoke(() => MessageBox.Show(e.Message, e.GetType().Name, MessageBoxButton.OK)); }
private void CurrentChannel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { DispatchNonFinalResult(PluginResult.Status.ERROR, e.Message); }
void channel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { throw new Exception(e.Message); }
void PushChannel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { Debug.WriteLine("A push notification {0} error occurred. {1} ({2}) {3}", e.ErrorType, e.Message, e.ErrorCode, e.ErrorAdditionalData); }
private void PushChannel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { Exception exception = new Exception(e.Message); ErrorHandler.Save(exception, MobileTypeEnum.WP8, additionalInformation: e.ErrorCode + ":" + e.ErrorAdditionalData); MessageBox.Show(String.Format("A push notification {0} error occurred. {1} ({2}) {3}", e.ErrorType, e.Message, e.ErrorCode, e.ErrorAdditionalData)); }
private void httpChannel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { Deployment.Current.Dispatcher.BeginInvoke(() => UpdateStatus(e.Message)); }
public void ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { BmobDebug.E(String.Format("A push notification {0} error occurred. {1} ({2}) {3}", e.ErrorType, e.Message, e.ErrorCode, e.ErrorAdditionalData)); }
private void PushChannelOnErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { Log("A push notification {0} error occurred.\n {1} ({2}) {3}\n", e.ErrorType, e.Message, e.ErrorCode, e.ErrorAdditionalData); }
/// <summary> /// 推送通知发生错误时触发 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private static void _pushChannel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { }
void PushChannel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { }
private void PushChannel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { // TODO: Let your cloud server know that the push channel to this device is no longer valid. }
static void channel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { Debug.WriteLine(e.Message); }
/// <summary> /// Event signaled when the notification channel fails to be established /// </summary> /// <param name="sender">The sending object</param> /// <param name="e">The event arguments</param> private void httpChannel_ExceptionOccurred(object sender, NotificationChannelErrorEventArgs e) { UpdateStatus(e.ErrorType + " occurred: " + e.Message); }
/// <summary> /// Event handler for when a push notification error occurs. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void PushChannel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { Utils.Tools.LogException((String.Format("A push notification {0} error occurred. {1} ({2}) {3}", e.ErrorType, e.Message, e.ErrorCode, e.ErrorAdditionalData)), null); if (processingError) return; processingError = true; switch (e.ErrorType) { case ChannelErrorType.ChannelOpenFailed: case ChannelErrorType.PayloadFormatError: //ChannelErrorType.ChannelOpenFailed //This error is returned when the Push Client and the Push Notification Service are unable to establish a connection //ChannelErrorType.PayloadFormatError: //This error is returned when the XML payload format or the HTTP header of the push notification is syntactically invalid. pushChannel = HttpNotificationChannel.Find(channelName); try { if (pushChannel != null) { pushChannel.Close(); pushChannel.Dispose(); pushChannel = null; } } catch (InvalidOperationException ioException) { Utils.Tools.LogException("Cannot close the channel", ioException); } catch (ArgumentException argEcxeption) { Utils.Tools.LogException("Cannot close the channel", argEcxeption); } /* UIThread.Invoke(() => { this.enablePushNotifications(); });*/ break; case ChannelErrorType.NotificationRateTooHigh: //This error is returned when the Push Client is unable to receive messages because the web service is sending too many messages at too quick a rate to a certain device. //Slow down the notifications //@TODO: send the server a signal? break; case ChannelErrorType.MessageBadContent: //This error is returned when the image reference is pointing to an HTTP image, even though the notification channel is not currently bound to a list of URIs. //This should never happen to us break; case ChannelErrorType.PowerLevelChanged: //This has been deprecated because push client no longer takes any action based on any power states break; case ChannelErrorType.Unknown: //An internal error has occurred and could not be recovered. A device reboot may be necessary. break; default: break; } processingError = false; }
void OnErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { MessageBox.Show("Error connecting to MPNS"); Debug.WriteLine("Error on communication with MPNS"); }
private void ErrorOccurred(NotificationChannelErrorEventArgs notificationChannelErrorEventArgs) { throw new NotImplementedException(); }
static void _channel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { // }
private static void PushChannel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e) { System.Diagnostics.Debug.WriteLine("ERROR CODE:" + e.ErrorCode + ": Could not register for push notifications do to " + e.Message); }