forked from OSchip/llvm-project
Fix SBError::SetErrorToGenericError
`SBError::SetErrorToGenericError` should call `Status::SetErrorToGenericError`, not `Status::SetErrorToErrno`. Reviewed By: teemperor Differential Revision: https://reviews.llvm.org/D90151
This commit is contained in:
parent
532f3bec3e
commit
206e8d8905
|
@ -118,7 +118,7 @@ void SBError::SetErrorToGenericError() {
|
|||
LLDB_RECORD_METHOD_NO_ARGS(void, SBError, SetErrorToGenericError);
|
||||
|
||||
CreateIfNeeded();
|
||||
m_opaque_up->SetErrorToErrno();
|
||||
m_opaque_up->SetErrorToGenericError();
|
||||
}
|
||||
|
||||
void SBError::SetErrorString(const char *err_str) {
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
"""Test the SBError APIs."""
|
||||
|
||||
from lldbsuite.test.lldbtest import *
|
||||
|
||||
class TestSBError(TestBase):
|
||||
|
||||
mydir = TestBase.compute_mydir(__file__)
|
||||
NO_DEBUG_INFO_TESTCASE = True
|
||||
|
||||
def test_generic_error(self):
|
||||
error = lldb.SBError()
|
||||
error.SetErrorToGenericError()
|
||||
self.assertEqual(error.GetType(), lldb.eErrorTypeGeneric)
|
Loading…
Reference in New Issue