Report a useful error when someone passes an incorrect python class name.

This commit is contained in:
Jim Ingham committed 2023-02-14 13:47:14 -08:00
1 parent 853a46cfb1
commit 9093f3c39b
3 files changed
+11 -3

No files matched your search

@@ -1949,8 +1949,11 @@ ScriptInterpreterPythonImpl::CreateScriptCommandObject(const char *class_name) {
PythonObject ret_val = LLDBSwigPythonCreateCommandObject(
class_name, m_dictionary_name.c_str(), debugger_sp);
return StructuredData::GenericSP(
new StructuredPythonObject(std::move(ret_val)));
if (ret_val.IsValid())
return StructuredData::GenericSP(
new StructuredPythonObject(std::move(ret_val)));
else
return {};
}
bool ScriptInterpreterPythonImpl::GenerateTypeScriptFunction(