SBError::SetErrorToGenericError should call Status::SetErrorToGenericError, not Status::SetErrorToErrno.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Could you add a test for this? This should be enough:
diff --git a/lldb/test/API/python_api/sberror/TestSBError.py b/lldb/test/API/python_api/sberror/TestSBError.py new file mode 100644 index 000000000000..91d5a334bff2 --- /dev/null +++ b/lldb/test/API/python_api/sberror/TestSBError.py @@ -0,0 +1,11 @@ +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)
Otherwise this LGTM, thanks for the patch!