소스 검색

improve error message

Rodja Trappe 1 년 전
부모
커밋
185f44af56
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      nicegui/client.py

+ 1 - 1
nicegui/client.py

@@ -205,7 +205,7 @@ class Client:
             deadline = time.time() + timeout
             while request_id not in self.waiting_javascript_commands:
                 if time.time() > deadline:
-                    raise TimeoutError('JavaScript did not respond in time')
+                    raise TimeoutError(f'JavaScript did not respond within {timeout:.1f} s')
                 await asyncio.sleep(check_interval)
             return self.waiting_javascript_commands.pop(request_id)