123456789101112131415161718192021222324252627282930 |
- # -*- coding: utf-8 -*-
- # @Time : 2023/7/21 15:15
- # @Author : XuJiakai
- # @File : ruler_validation_exception
- # @Software: PyCharm
- class RulerValidationException(Exception):
- def __init__(self, ruler_code, msg=None, ):
- """
- 业务逻辑规则校验,不符合数据业务逻辑的,将抛出此异常
- :param ruler_code:
- :param msg:
- """
- self.ruler_code = ruler_code
- self.msg = msg
- pass
- def __str__(self):
- return f"数据校验异常,ruler_code: {self.ruler_code} , msg : {self.msg}"
- def get_ruler_code(self):
- return self.ruler_code
- def get_msg(self):
- return self.msg
- if __name__ == '__main__':
- pass
|