_exceptions.py 353 B

1234567891011121314
  1. # @description:
  2. # @author: licanglong
  3. # @date: 2025/1/13 11:49
  4. from app.core._constants import SYS_SERVER_FAIL, SYS_SERVER_FAIL_MSG
  5. class BizException(Exception):
  6. """
  7. 业务异常
  8. """
  9. def __init__(self, message: str = None, code: int = SYS_SERVER_FAIL):
  10. self.message = message or SYS_SERVER_FAIL_MSG
  11. self.code = code