Inheritance: System.Exception
Example #1
0
 public static string GetErrString(int code, string appendString = "")
 {
     if (WXException.errStringMap == null)
     {
         WXException.initErrStringMap();
     }
     if (appendString == null)
     {
         appendString = "";
     }
     if (code > 3 || code < 0)
     {
         code = 0;
     }
     if (WXException.errStringMap != null)
     {
         string text = WXException.errStringMap[code + "_" + WXException.getLanguage()];
         if (!string.IsNullOrEmpty(appendString))
         {
             text = text + ": " + appendString;
         }
         return(text);
     }
     return(string.Empty);
 }
Example #2
0
 public WXException(int errCode, string appendString = "") : base(WXException.GetErrString(errCode, appendString))
 {
     base.HResult = errCode;
 }