[lldb/crashlog] Surface error using SBCommandReturnObject argument
This patch allows the crashlog script to surface its errors to lldb by using the provided SBCommandReturnObject argument. rdar://95048193 Differential Revision: https://reviews.llvm.org/D129614 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
This commit is contained in:
@@ -2888,9 +2888,10 @@ bool ScriptInterpreterPythonImpl::RunScriptBasedCommand(
|
||||
|
||||
if (!ret_val)
|
||||
error.SetErrorString("unable to execute script function");
|
||||
else
|
||||
error.Clear();
|
||||
else if (cmd_retobj.GetStatus() == eReturnStatusFailed)
|
||||
return false;
|
||||
|
||||
error.Clear();
|
||||
return ret_val;
|
||||
}
|
||||
|
||||
@@ -2932,9 +2933,10 @@ bool ScriptInterpreterPythonImpl::RunScriptBasedCommand(
|
||||
|
||||
if (!ret_val)
|
||||
error.SetErrorString("unable to execute script function");
|
||||
else
|
||||
error.Clear();
|
||||
else if (cmd_retobj.GetStatus() == eReturnStatusFailed)
|
||||
return false;
|
||||
|
||||
error.Clear();
|
||||
return ret_val;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user