// 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; }
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); }
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); }
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(); }
// RESPONDER public void Close(DynError error) { if (_closed) { return; } _listening = false; _closed = true; _inStream.Close(); _outStream.Close(); _sessionListener.OnClose(); }
public override void OnError(Session session, DynError code, string message) { session.MessageOutputStream.WriteMessage(CreateAlertMessage(code)); }
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; }
public override void OnError(Session session, DynError code, string message) { session.MessageOutputStream.WriteMessage(CreateFastAlertMessage(code)); }
public void OnError(Exception exception, DynError error, string format, params object[] args) { }
public abstract void OnError(Session param1, DynError param2, string param3);
public static ErrorInfoAttribute GetErrorInfo(this DynError error) { return(Util.GetEnumSingleAttribute <ErrorInfoAttribute, DynError>(error)); }