MCPcopy Create free account
hub / github.com/MearaY/StegaPy / __init__

Method __init__

StegaPy/exceptions.py:11–24  ·  view source on GitHub ↗

初始化异常

(self, message=None, error_code=None, namespace=None, *args)

Source from the content-addressed store, hash-verified

9 UNHANDLED_EXCEPTION = "UNHANDLED_EXCEPTION"
10
11 def __init__(self, message=None, error_code=None, namespace=None, *args):
12 """初始化异常"""
13 self.error_code = error_code or self.UNHANDLED_EXCEPTION
14 self.namespace = namespace
15 self.args = args
16
17 if message:
18 self.message = message
19 else:
20 self.message = f"StegaPy错误: {self.error_code}"
21 if args:
22 self.message += f" - {', '.join(str(a) for a in args)}"
23
24 super().__init__(self.message)
25
26 def get_error_code(self):
27 """获取错误代码"""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected