diff options
Diffstat (limited to 'tools/cru-py/cru/error.py')
-rw-r--r-- | tools/cru-py/cru/error.py | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/tools/cru-py/cru/error.py b/tools/cru-py/cru/error.py deleted file mode 100644 index 95edbd3..0000000 --- a/tools/cru-py/cru/error.py +++ /dev/null @@ -1,27 +0,0 @@ -from typing import NoReturn - - -class CruException(Exception): - """Base exception class of all exceptions in cru.""" - - -class CruUnreachableError(CruException): - """Raised when a code path is unreachable.""" - - -def cru_unreachable() -> NoReturn: - raise CruUnreachableError() - - -class CruInternalError(CruException): - """Raised when an internal logic error occurs.""" - - -class UserFriendlyException(CruException): - def __init__(self, message: str, user_message: str, *args, **kwargs) -> None: - super().__init__(message, *args, **kwargs) - self._user_message = user_message - - @property - def user_message(self) -> str: - return self._user_message |