home · contact · privacy
Don't use overly-broad BaseException where inadequate.
authorChristian Heller <c.heller@plomlompom.de>
Mon, 6 Oct 2025 19:35:08 +0000 (21:35 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Mon, 6 Oct 2025 19:35:08 +0000 (21:35 +0200)
src/ircplom/client.py
src/run.py

index 141b59e9c0319cd1f3440b5254c9d7a00f6491e1..330022d548bc815011cdaadb208ac42f0fc0e43a 100644 (file)
@@ -21,15 +21,15 @@ from ircplom.msg_parse_expectations import MSG_EXPECTATIONS
 _NAMES_DESIRED_SERVER_CAPS = ('sasl',)
 
 
-class SendFail(BaseException):
+class SendFail(Exception):
     'When Client.send fails.'
 
 
-class TargetUserOffline(BaseException):
+class TargetUserOffline(Exception):
     'When according to server our target user is not to be found.'
 
 
-class ImplementationFail(BaseException):
+class ImplementationFail(Exception):
     'When no matching parser found for server message.'
 
 
index 2b17f648a01366da5e26c48c0bb484fef81fa6e3..90c03cd34bca15ef2d2f7159ec5542ed95c82680 100755 (executable)
@@ -43,7 +43,7 @@ def main_loop(cls_term: type[TerminalInterface], cls_tui: type[BaseTui]
 
 
 if __name__ == '__main__':
-    class _HandledException(BaseException):
+    class _HandledException(Exception):
         'To fail with only passed message rather than stack listing'
 
     try: