internal BaseException(int errorCode) { try { 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; } }
/// <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; } }