summaryrefslogtreecommitdiff
path: root/wrappers/python/eduvpn_common/error.py
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-09-26 17:36:30 +0200
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-09-27 10:53:37 +0200
commit09ec69dfdef409868f1cb39cb8cc4b33c8690c9f (patch)
tree109925dbbee4a9120211897582760f96010ae8f2 /wrappers/python/eduvpn_common/error.py
parent0a19c2dedcaaa177b420eac99149515d84508204 (diff)
Python: Reformat and move most loading out of __init__
Diffstat (limited to 'wrappers/python/eduvpn_common/error.py')
-rw-r--r--wrappers/python/eduvpn_common/error.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/wrappers/python/eduvpn_common/error.py b/wrappers/python/eduvpn_common/error.py
index 50298bb..a5b59b4 100644
--- a/wrappers/python/eduvpn_common/error.py
+++ b/wrappers/python/eduvpn_common/error.py
@@ -1,15 +1,16 @@
from enum import Enum
+
class ErrorLevel(Enum):
ERR_OTHER = 0
ERR_INFO = 1
ERR_WARNING = 2
ERR_FATAL = 3
+
class WrappedError(Exception):
def __init__(self, traceback: str, cause: str, level: ErrorLevel):
super(WrappedError, self).__init__(cause)
self.traceback = traceback
self.cause = cause
self.level = level
-