diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-09-26 16:47:35 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-09-26 16:48:22 +0200 |
| commit | 0a19c2dedcaaa177b420eac99149515d84508204 (patch) | |
| tree | 34631498e694895a398da32fd077d855d938b113 /wrappers/python/eduvpn_common/error.py | |
| parent | 060d133acbc1d11cd79e32c6861956c265d87c7f (diff) | |
Python: Move from src/ to eduvpn_common/ and absolufy imports
Diffstat (limited to 'wrappers/python/eduvpn_common/error.py')
| -rw-r--r-- | wrappers/python/eduvpn_common/error.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/wrappers/python/eduvpn_common/error.py b/wrappers/python/eduvpn_common/error.py new file mode 100644 index 0000000..50298bb --- /dev/null +++ b/wrappers/python/eduvpn_common/error.py @@ -0,0 +1,15 @@ +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 + |
