Example #1
0
        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);
                }
            }
        }
Example #2
0
        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
                }
            }
        }
Example #3
0
        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;
        }
Example #4
0
        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;
        }