public RPCException(string code, string msg, RPCException orig, JObject data = null) { ErrorCode = code; ErrorMessage = msg + ": " + orig.ErrorMessage; ErrorData = data ?? new JObject(); ErrorData ["orig"] = orig.AsHeader(); }
public RPCException(string code, string msg, RPCException orig, JObject data = null) { ErrorCode = code; ErrorMessage = msg + ": " + orig.ErrorMessage; ErrorData = data ?? new JObject (); ErrorData ["orig"] = orig.AsHeader (); }
public static RPCException Wrap(Exception ex) { RPCException exx = ex as RPCException; if (exx != null) { return(exx); // no wrapping needed } else { return(new RPCException("general", ex.ToString())); } }