summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Python/python-wrapper.swig
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/scripts/Python/python-wrapper.swig')
-rw-r--r--lldb/scripts/Python/python-wrapper.swig6
1 files changed, 5 insertions, 1 deletions
diff --git a/lldb/scripts/Python/python-wrapper.swig b/lldb/scripts/Python/python-wrapper.swig
index 8509899df27..8a99daa90c8 100644
--- a/lldb/scripts/Python/python-wrapper.swig
+++ b/lldb/scripts/Python/python-wrapper.swig
@@ -250,6 +250,7 @@ LLDBSwigPythonCreateScriptedThreadPlan
(
const char *python_class_name,
const char *session_dictionary_name,
+ std::string &error_string,
const lldb::ThreadPlanSP& thread_plan_sp
)
{
@@ -267,8 +268,11 @@ LLDBSwigPythonCreateScriptedThreadPlan
auto dict = PythonModule::MainModule().ResolveName<PythonDictionary>(session_dictionary_name);
auto pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(python_class_name, dict);
- if (!pfunc.IsAllocated())
+ if (!pfunc.IsAllocated()) {
+ error_string.append("could not find script class: ");
+ error_string.append(python_class_name);
return nullptr;
+ }
PythonObject tp_arg(PyRefType::Owned, SBTypeToSWIGWrapper(tp_value));
OpenPOWER on IntegriCloud