aboutsummaryrefslogtreecommitdiff
path: root/tools/cru-py/cru/_error.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/cru-py/cru/_error.py')
-rw-r--r--tools/cru-py/cru/_error.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/cru-py/cru/_error.py b/tools/cru-py/cru/_error.py
index 0d2bf79..e4bf3d6 100644
--- a/tools/cru-py/cru/_error.py
+++ b/tools/cru-py/cru/_error.py
@@ -18,9 +18,11 @@ class CruInternalError(CruException):
class CruUserFriendlyException(CruException):
- def __init__(self, message: str, user_message: str, *args, **kwargs) -> None:
+ def __init__(
+ self, message: str, user_message: str | None = None, *args, **kwargs
+ ) -> None:
super().__init__(message, *args, **kwargs)
- self._user_message = user_message
+ self._user_message = user_message or message
@property
def user_message(self) -> str: