/// <summary> /// Handles request synchronously in the context of the calling thread. Returns NULL for one-way calls /// </summary> public ResponseMsg HandleRequestFailure(FID reqID, bool oneWay, Exception failure, object bindingSpecCtx) { if (oneWay) { return(null); } var red = new RemoteExceptionData(failure); var response = new ResponseMsg(reqID, red); response.__SetBindingSpecificContext(bindingSpecCtx); return(response); }
private ResponseMsg handleRequest(RequestMsg request) { try { ServerCallContext.__SetThreadLevelContext(request); try { var response = doWork(request); var rhdr = ServerCallContext.GetResponseHeadersOrNull(); if (rhdr != null && response != null) { response.Headers = rhdr; } return(response); } finally { ServerCallContext.__ResetThreadLevelContext(); } } catch (Exception error) { if (request.OneWay) { //because it is one-way, the caller will never know about it this.WriteLog(LogSrc.Server, MessageType.Error, string.Format(StringConsts.GLUE_SERVER_ONE_WAY_CALL_ERROR + error.ToMessageWithType()), from: "SrvrHndlr.handleRequest(ReqMsg)", exception: error ); return(null); } else { var red = new RemoteExceptionData(error); var response = new ResponseMsg(request.RequestID, red); response.__SetBindingSpecificContext(request); return(response); } } }
public RemoteException(string message, RemoteExceptionData data, Exception inner) : base(message, inner) { m_Remote = data; }
public RemoteException(string message, RemoteExceptionData data) : base(message) { m_Remote = data; }
public RemoteException(RemoteExceptionData data) : base(data.ToString()) { m_Remote = data; }