private static String CheckForFailureInReply(RpcCall call, RpcReply reply) { if (reply.status != RpcReplyStatus.Accepted) { return(DataStringBuilder.DataString(reply.rejectedReply, new StringBuilder())); } RpcAcceptedReply acceptedReply = reply.acceptedReply; if (acceptedReply.status == RpcAcceptStatus.Success) { return(null); } if (acceptedReply.status == RpcAcceptStatus.ProgramMismatch) { return(String.Format("ProgramMismatch: {0}", DataStringBuilder.DataString(acceptedReply.mismatchInfo, new StringBuilder()))); } else { return(acceptedReply.status.ToString()); } }
public RpcCallFailedException(RpcCall call, RpcReply reply) : this(call, FailureReason(call, reply)) { }
private RpcCallFailedException(RpcCall call, String failureReason) : base(String.Format("{0} failed: {1}", DataStringBuilder.DataString(call, new StringBuilder()), failureReason)) { }
public abstract RpcReply Call(String clientString, RpcCall call, Byte[] callParameters, UInt32 callOffset, UInt32 callMaxOffset, out ISerializer replyParameters);