From 93c98346e98a50e481efda95c9b095bf2b1c8a73 Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Sat, 28 Sep 2019 00:53:45 +0000 Subject: Give an error when StepUsingScriptedThreadPlan is passed a bad classname. Differential Revision: https://reviews.llvm.org/D68173 llvm-svn: 373135 --- lldb/scripts/Python/python-wrapper.swig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lldb/scripts/Python/python-wrapper.swig') diff --git a/lldb/scripts/Python/python-wrapper.swig b/lldb/scripts/Python/python-wrapper.swig index 8509899..8a99daa 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(session_dictionary_name); auto pfunc = PythonObject::ResolveNameWithDictionary(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)); -- cgit v1.1