[Lldb-commits] [lldb] [lldb-dap] Adding exception handling for dap server disconnect and terminations in lldbdap_testcase.py (PR #155335)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Aug 26 09:21:11 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {darker}-->
:warning: Python code formatter, darker found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
darker --check --diff -r HEAD~1...HEAD lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- lldbdap_testcase.py 2025-08-26 04:09:59.000000 +0000
+++ lldbdap_testcase.py 2025-08-26 16:20:43.926802 +0000
@@ -468,15 +468,19 @@
if disconnectAutomatically:
try:
self.dap_server.request_disconnect(terminateDebuggee=True)
except Exception as e:
# DAP server might not be responsive, skip disconnect and terminate directly
- print(f"Warning: disconnect failed ({e}), skipping and terminating directly")
+ print(
+ f"Warning: disconnect failed ({e}), skipping and terminating directly"
+ )
try:
self.dap_server.terminate()
except Exception as e:
- print(f"Warning: terminate failed ({e}), DAP server may have already died")
+ print(
+ f"Warning: terminate failed ({e}), DAP server may have already died"
+ )
# Execute the cleanup function during test case tear down.
self.addTearDownHook(cleanup)
# Initialize and launch the program
self.dap_server.request_initialize(sourceInitFile)
``````````
</details>
https://github.com/llvm/llvm-project/pull/155335
More information about the lldb-commits
mailing list