home · contact · privacy
Report ImplementationFail across all Client windows (since we can't know which should... master
authorChristian Heller <c.heller@plomlompom.de>
Sun, 5 Oct 2025 04:58:04 +0000 (06:58 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Sun, 5 Oct 2025 04:58:04 +0000 (06:58 +0200)
src/ircplom/client.py
src/ircplom/client_tui.py
src/tests/test.test

index 619d554a09750ba87031129d45f9bf55189d2619..e01c35009ff2dbf0dd596bbcc3c056055eb5f9a3 100644 (file)
@@ -947,7 +947,7 @@ class Client(ABC, ClientQueueMixin):
                 ret = result
                 break
         if '_verb' not in ret:
-            raise ImplementationFail(f'No handler implemented for: {msg.raw}')
+            raise ImplementationFail(msg.raw)
         for n_u_h in ret['_nickuserhosts']:  # update, turn into proper users
             if (id_ := self.db.users.id_for_nickuserhost(
                     n_u_h, allow_none=True, updating=True)):
index 859a06affde9db7918f7f13dd631ad0cc01df40f..08fbbfd39ca76e69aeb28147d16f0c3cd0e2caf9 100644 (file)
@@ -504,7 +504,10 @@ class ClientKnowingTui(Client):
         try:
             super().handle_msg(msg)
         except ImplementationFail as e:
-            self._alert(str(e))
+            for scope in (_LogScope.DEBUG, _LogScope.ALL):
+                self._client_tui_trigger(
+                        'log', msg=f'No handler implemented for: {e}',
+                        scope=scope, alert=True)
         except TargetUserOffline as e:
             name = f'{e}'
             self._log(f'{name} not online', target=name, alert=True)
index ab814aa8f3bd6c5f5f7ed9e487a8d7fa4035456f..f15fc0a3895609d9118d370d41bf7da70cac172e 100644 (file)
 1 ..#   /window.raw VERB [PARAMS_STR]
 1 ..#   /window.reconnect
 
-# test lack of implementation
-:0:1 ..< foo bar baz
-1 .!$ No handler implemented for: foo bar baz
-
 # test recoverable 432
 > /nick @foo
 1 ..> NICK :@foo
 1 ..$ channels:#test cleared
 1 ..$ users:3 cleared
 
+# handle lack of implementation
+:0:1 ..< foo bar baz
+1 .!$ No handler implemented for: foo bar baz
+2,3,4,5,6,7 .!$ No handler implemented for: foo bar baz
+
 # fail to reconnect while connected
 > /reconnect
 1 .!$ not re-connecting since already connected