Made the string representation for a SBValue return what "frame variable"
would return instead of a less than helpful "name: '%s'" description.
Make sure that when we ask for the error from a ValueObject object we
first update the value if needed.
Cleaned up some SB functions to use internal functions and not re-call
through the public API when possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134497 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBError.cpp b/source/API/SBError.cpp
index c8aa0cd..bcbb734 100644
--- a/source/API/SBError.cpp
+++ b/source/API/SBError.cpp
@@ -218,35 +218,16 @@
{
if (m_opaque_ap.get())
{
- if (Success())
- description.Printf ("Status: Success");
+ if (m_opaque_ap->Success())
+ description.Printf ("success");
else
{
const char * err_string = GetCString();
- description.Printf ("Status: Error: %s", (err_string != NULL ? err_string : ""));
+ description.Printf ("error: %s", (err_string != NULL ? err_string : ""));
}
}
else
- description.Printf ("No value");
-
- return true;
-}
-
-bool
-SBError::GetDescription (SBStream &description) const
-{
- if (m_opaque_ap.get())
- {
- if (Success())
- description.Printf ("Status: Success");
- else
- {
- const char * err_string = GetCString();
- description.Printf ("Status: Error: %s", (err_string != NULL ? err_string : ""));
- }
- }
- else
- description.Printf ("No value");
+ description.Printf ("error: <NULL>");
return true;
}