private async Task Error(Exception ex) { MqttExceptionEventHandler h = this.OnError; if (h != null) { try { await h(this, ex); } catch (Exception ex2) { this.Exception(ex2); Log.Critical(ex2); } } }
private void Error(Exception ex) { MqttExceptionEventHandler h = this.OnError; if (!(h is null)) { try { h(this, ex); } catch (Exception ex2) { #if LineListener LLOut(ex2.Message, Color.Yellow, Color.DarkRed); #endif } } }
private async Task ConnectionError(object Sender, Exception ex) { MqttExceptionEventHandler h = this.OnConnectionError; if (h != null) { try { await h(this, ex); } catch (Exception ex2) { this.Exception(ex2); Log.Critical(ex2); } } await this.Error(ex); this.State = MqttState.Error; }
private void ConnectionError(Exception ex) { MqttExceptionEventHandler h = this.OnConnectionError; if (h != null) { try { h(this, ex); } catch (Exception ex2) { this.Exception(ex2); Log.Critical(ex2); } } this.Error(ex); this.State = MqttState.Error; }