|
12345678910111213141516171819 |
- # -*- coding: utf-8 -*-
- from loguru import logger
-
-
- """
- 自定义异常
- """
-
-
- class ServiceException(Exception):
- def __init__(self, code, msg):
- self.code = code
- self.msg = msg
-
- def __str__(self):
- logger.error("异常编码:{}, 异常描述:{}", self.code, self.msg)
-
-
-
|