diff options
Diffstat (limited to 'kvmd/apps/vnc/rfb/errors.py')
-rw-r--r-- | kvmd/apps/vnc/rfb/errors.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/kvmd/apps/vnc/rfb/errors.py b/kvmd/apps/vnc/rfb/errors.py index a5bb17e3..1cf68818 100644 --- a/kvmd/apps/vnc/rfb/errors.py +++ b/kvmd/apps/vnc/rfb/errors.py @@ -20,10 +20,14 @@ # ========================================================================== # +from .... import tools + + +# ===== class RfbError(Exception): pass class RfbConnectionError(RfbError): - def __init__(self, err: Exception) -> None: - super().__init__(type(err).__name__) + def __init__(self, msg: str, err: Exception) -> None: + super().__init__(f"{msg}: {tools.efmt(err)}") |