public Error(int?requestId, CodeMsgPair error, string tail) { RequestId = requestId; ErrorCode = error.Code; ErrorMessage = error.Message + tail; Exception = null; }
public void Send(int reqId, List <byte> paramsList, CodeMsgPair error) { try { Send(paramsList); } catch (Exception e) { throw new Exception(String.Format("Exception. Id: {0}, Code: {1}, Msg: {2}", reqId, error.Code, error.Message), e); } }
public void SendCancelRequest(OutgoingMessages msgType, int version, CodeMsgPair error) { List <byte> paramsList = new List <byte>(); paramsList.AddParameter(msgType); paramsList.AddParameter(version); try { Send(paramsList); } catch (Exception e) { throw new Exception(String.Format("Exception. Code: {0}, Msg: {1}", error.Code, error.Message), e); } }
protected void SendCancelRequest(int msgType, int version, CodeMsgPair errorMessage) { List<byte> paramsList = new List<byte>(); paramsList.AddParameter(msgType); paramsList.AddParameter(version); try { lock (this) { Send(paramsList); } } catch (Exception) { wrapper.error(IncomingMessage.NotValid, errorMessage.Code, errorMessage.Message); Close(); } }
protected void ReportError(int reqId, CodeMsgPair error, string tail) { ReportError(reqId, error.Code, error.Message+tail); }
protected void Send(int reqId, List<byte> paramsList, CodeMsgPair error) { try { lock (this) { Send(paramsList); } } catch (Exception) { wrapper.error(reqId, error.Code, error.Message); Close(); } }
protected void Send(List<byte> paramsList, CodeMsgPair error) { Send(IncomingMessage.NotValid, paramsList, error); }
public EClientException(CodeMsgPair err, string text) : this(err) { Text = text; }
public EClientException(CodeMsgPair err) { Err = err; }
public void Send(List <byte> paramsList, CodeMsgPair error) { Send(IncomingMessage.NotValid, paramsList, error); }
protected void SendCancelRequest(OutgoingMessages msgType, int version, CodeMsgPair errorMessage) { var paramsList = new BinaryWriter(new MemoryStream()); var lengthPos = prepareBuffer(paramsList); paramsList.AddParameter(msgType); paramsList.AddParameter(version); try { lock (this) { CloseAndSend(paramsList, lengthPos); } } catch (Exception) { wrapper.error(IncomingMessage.NotValid, errorMessage.Code, errorMessage.Message); Close(); } }
protected void CloseAndSend(int reqId, BinaryWriter paramsList, uint lengthPos, CodeMsgPair error) { try { lock (this) { CloseAndSend(paramsList, lengthPos); } } catch (Exception) { wrapper.error(reqId, error.Code, error.Message); Close(); } }
protected void CloseAndSend(BinaryWriter paramsList, uint lengthPos, CodeMsgPair error) { CloseAndSend(IncomingMessage.NotValid, paramsList, lengthPos, error); }
public EClientException(CodeMsgPair err) { this.Err = err; }
public Error(int? requestId, CodeMsgPair error, string tail) { RequestId = requestId; ErrorCode = error.Code; ErrorMessage = error.Message + tail; Exception = null; }