Example #1
0
 // RESPONDER
 public void Close(DynError error)
 {
     _listening = false;
     _inStream.Close();
     _outStream.Close();
     _sessionListener.OnClose();
 }
 public static Message CreateFastAlertMessage(DynError code)
 {
     ErrorInfoAttribute attr = code.GetErrorInfo();
     var alert = new Message(AlertTemplate);
     alert.SetInteger(1, (int) attr.Severity);
     alert.SetInteger(2, (int) code);
     alert.SetString(4, attr.Description);
     return alert;
 }
Example #3
0
        public static Message CreateAlertMessage(DynError code)
        {
            ErrorInfoAttribute attr = code.GetErrorInfo();
            var alert = new Message(AlertTemplate);

            alert.SetInteger(1, (int)attr.Severity);
            alert.SetInteger(2, (int)code);
            alert.SetString(4, attr.Description);
            return(alert);
        }
Example #4
0
 public void OnError(Exception exception, DynError error, string format, params object[] args)
 {
     if (error == DynError.TemplateNotRegistered)
     {
         error  = DynError.TemplateNotSupported;
         format = "Template Not Supported";
     }
     _protocol.OnError(this, error, string.Format(format, args));
     _errorHandler.OnError(exception, error, format, args);
 }
Example #5
0
 public void OnError(Exception exception, DynError error, string format, params object[] args)
 {
     if (!string.IsNullOrEmpty(format))
     {
         Console.WriteLine(format, args);
     }
     else
     {
         Console.WriteLine($"{exception?.Message}; {error}");
     }
     _FastServer.Close();
 }
Example #6
0
        // RESPONDER
        public void Close(DynError error)
        {
            if (_closed)
            {
                return;
            }

            _listening = false;
            _closed    = true;
            _inStream.Close();
            _outStream.Close();
            _sessionListener.OnClose();
        }
Example #7
0
 public override void OnError(Session session, DynError code, string message)
 {
     session.MessageOutputStream.WriteMessage(CreateAlertMessage(code));
 }
Example #8
0
 public void OnError(Exception exception, DynError error, string format, params object[] args)
 {
     Console.WriteLine(format, args);
 }
 public void OnError(Exception exception, DynError error, string format, params object[] args)
 {
     throw new DynErrorException(exception, error, format, args);
 }
 public DynErrorException(Exception inner, DynError error, string format, params object[] args)
     : base(inner, format, args)
 {
     _error = error;
 }
Example #11
0
 public DynErrorException(Exception inner, DynError error, string format, params object[] args)
     : base(inner, format, args)
 {
     _error = error;
 }
 public override void OnError(Session session, DynError code, string message)
 {
     session.MessageOutputStream.WriteMessage(CreateFastAlertMessage(code));
 }
Example #13
0
 public void OnError(Exception exception, DynError error, string format, params object[] args)
 {
 }
 public void OnError(Exception exception, DynError error, string format, params object[] args)
 {
 }
 public abstract void OnError(Session param1, DynError param2, string param3);
Example #16
0
 public void OnError(Exception exception, DynError error, string format, params object[] args)
 {
     throw new DynErrorException(exception, error, format, args);
 }
Example #17
0
 public abstract void OnError(Session param1, DynError param2, string param3);
Example #18
0
 public void OnError(Exception exception, DynError error, string format, params object[] args)
 {
     if (error == DynError.TemplateNotRegistered)
     {
         error = DynError.TemplateNotSupported;
         format = "Template Not Supported";
     }
     _protocol.OnError(this, error, string.Format(format, args));
     _errorHandler.OnError(exception, error, format, args);
 }
Example #19
0
 // RESPONDER
 public void Close(DynError error)
 {
     _listening = false;
     _inStream.Close();
     _outStream.Close();
     _sessionListener.OnClose();
 }
Example #20
0
 public void OnError(Exception exception, DynError error, string format, params object[] args)
 {
     Console.WriteLine(format, args);
 }
Example #21
0
 public static ErrorInfoAttribute GetErrorInfo(this DynError error)
 {
     return(Util.GetEnumSingleAttribute <ErrorInfoAttribute, DynError>(error));
 }