空港防疫算法交互
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
328B

  1. # -*- coding: utf-8 -*-
  2. from loguru import logger
  3. """
  4. 自定义异常
  5. """
  6. class ServiceException(Exception): # 继承异常类
  7. def __init__(self, code, msg):
  8. self.code = code
  9. self.msg = msg
  10. def __str__(self):
  11. logger.error("异常编码:{}, 异常描述:{}", self.code, self.msg)