basic-auto-test/util/customize_exception.py

26 lines
631 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# -*- coding: utf-8 -*-
# -------------------------------
# @文件customize_exception.py
# @时间2024/4/16 下午4:58
# @作者caiweichao
# @功能描述:自定义异常类
# -------------------------------
from util.basic.log import Log
class LenError(Exception):
# 数据长度比较异常
def __init__(self, message):
self.message = message
Log.error(message)
super().__init__(self.message)
class AnalysisError(Exception):
# 数据解析异常
def __init__(self, message):
self.message = message
Log.error(message)
super().__init__(self.message)