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.

llvm-svn: 134497
This commit is contained in:
Greg Clayton
2011-07-06 16:49:27 +00:00
parent 37d30835f0
commit 262f80df5e
6 changed files with 32 additions and 45 deletions

View File

@@ -218,35 +218,16 @@ SBError::GetDescription (SBStream &description)
{
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;
}