# -*- coding: utf-8 -*-
"""
@author: yq
@time: 2024/11/8
@desc: 自定义异常
"""
from enums import ResultCodesEnum


class GeneralException(Exception):
    def __init__(self, result_codes_enum: ResultCodesEnum, *args, message: str = "", **kwargs):
        self.message = message
        self.result_codes_enum = result_codes_enum

    def __str__(self):
        return f"codes: {self.result_codes_enum.code} {self.result_codes_enum.message} message: {self.message}"
