Beispiel #1
0
 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();
 }
Beispiel #2
0
 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 ();
 }
Beispiel #3
0
        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()));
            }
        }