# -*- 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)



