[Lldb-commits] [PATCH] D90151: Fix SBError::SetErrorToGenericError

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 26 07:45:10 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG206e8d890503: Fix SBError::SetErrorToGenericError (authored by werat, committed by teemperor).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90151/new/

https://reviews.llvm.org/D90151

Files:
  lldb/source/API/SBError.cpp
  lldb/test/API/python_api/sberror/TestSBError.py


Index: lldb/test/API/python_api/sberror/TestSBError.py
===================================================================
--- /dev/null
+++ lldb/test/API/python_api/sberror/TestSBError.py
@@ -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)
Index: lldb/source/API/SBError.cpp
===================================================================
--- lldb/source/API/SBError.cpp
+++ lldb/source/API/SBError.cpp
@@ -118,7 +118,7 @@
   LLDB_RECORD_METHOD_NO_ARGS(void, SBError, SetErrorToGenericError);
 
   CreateIfNeeded();
-  m_opaque_up->SetErrorToErrno();
+  m_opaque_up->SetErrorToGenericError();
 }
 
 void SBError::SetErrorString(const char *err_str) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90151.300669.patch
Type: text/x-patch
Size: 983 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20201026/ed549b98/attachment.bin>


More information about the lldb-commits mailing list