Example #1
0
        public TopSchemaException(TopSchemaErrorCodeEnum codeEnum, string fieldId)
            : base(TopSchemaErrorCodeEnumHelper.ToMessage(codeEnum))
        {
            string msg = TopSchemaErrorCodeEnumHelper.ToMessage(codeEnum);

            if (!string.IsNullOrEmpty(fieldId))
            {
                msg += "At the filed which id is " + fieldId;
            }
            this.ErrorCode = TopSchemaErrorCodeEnumHelper.ToErrorCode(codeEnum);
            this.ErrorMsg  = msg;
            this.FieldId   = fieldId;
        }
Example #2
0
 public TopSchemaException(string message, Exception cause)
     : base(message, cause)
 {
     this.ErrorCode = TopSchemaErrorCodeEnumHelper.ToErrorCode(TopSchemaErrorCodeEnum.ERROR_CODE_40000);
     this.ErrorMsg  = message;
 }