Esempio n. 1
0
 internal BaseException(string errorType)
 {
     try
     {
         this.message   = SDBErrorLookup.GetErrorDescriptionByType(errorType);
         this.errorCode = SDBErrorLookup.GetErrorCodeByType(errorType);
         this.errorType = errorType;
     }
     catch (Exception)
     {
         this.message   = SequoiadbConstants.UNKONWN_DESC;
         this.errorType = SequoiadbConstants.UNKNOWN_TYPE;
         this.errorCode = SequoiadbConstants.UNKNOWN_CODE;
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Expection throw by sequoiadb.
 /// </summary>
 /// <param name="errorCode">The error code return by engine</param>
 /// <param name="detail">The error Detail</param>
 internal BaseException(int errorCode, string detail)
 {
     try
     {
         if (detail != null && detail != "")
         {
             this.message = SDBErrorLookup.GetErrorDescriptionByCode(errorCode) +
                            ", " + detail;
         }
         else
         {
             this.message = SDBErrorLookup.GetErrorDescriptionByCode(errorCode);
         }
         this.errorType = SDBErrorLookup.GetErrorTypeByCode(errorCode);
         this.errorCode = errorCode;
     }
     catch (Exception)
     {
         this.message   = SequoiadbConstants.UNKONWN_DESC;
         this.errorType = SequoiadbConstants.UNKNOWN_TYPE;
         this.errorCode = SequoiadbConstants.UNKNOWN_CODE;
     }
 }