[Lldb-commits] [lldb] [lldb] Set return status to Failed when Python command raises uncaught exception (PR #113996)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Oct 29 16:23:44 PDT 2024
================
@@ -621,6 +623,9 @@ bool lldb_private::python::SWIGBridge::LLDBSwigPythonCallCommand(
pfunc(debugger_arg, PythonString(args),
SWIGBridge::ToSWIGWrapper(std::move(exe_ctx_ref_sp)), cmd_retobj_arg.obj(), dict);
+ if (PyErr_Occurred())
----------------
jimingham wrote:
Yes, appending a command-centered message to the error stream sounds right to me.
A raw dump of a python expression - especially if you don't really know that lldb has python implemented commands - will just be confusing. But if we have the exception dump followed by a line attributing it to this lldb command, that would clearer.
It doesn't look like you know the actual command name at this point, but even saying the python function or class name might help people figure it out.
https://github.com/llvm/llvm-project/pull/113996
More information about the lldb-commits
mailing list