diff options
author | Enrico Granata <egranata@apple.com> | 2013-07-09 20:14:26 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2013-07-09 20:14:26 +0000 |
commit | eff81a471acdf888e3cf5bc6550bd62b465d4e06 (patch) | |
tree | dc00802f687af8148091b6a2441f142b3f0f690d /lldb/source/Interpreter/CommandReturnObject.cpp | |
parent | 61a56d7a3a7813f0961a522f1dc980bcf27fcfbb (diff) | |
download | bcm5719-llvm-eff81a471acdf888e3cf5bc6550bd62b465d4e06.tar.gz bcm5719-llvm-eff81a471acdf888e3cf5bc6550bd62b465d4e06.zip |
Second attempt at getting the PyCallable changes in trunk
Thanks to Daniel Malea for helping test this patch for Linux happiness!
llvm-svn: 185965
Diffstat (limited to 'lldb/source/Interpreter/CommandReturnObject.cpp')
-rw-r--r-- | lldb/source/Interpreter/CommandReturnObject.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lldb/source/Interpreter/CommandReturnObject.cpp b/lldb/source/Interpreter/CommandReturnObject.cpp index 2b93a546f8a..9c63753a23f 100644 --- a/lldb/source/Interpreter/CommandReturnObject.cpp +++ b/lldb/source/Interpreter/CommandReturnObject.cpp @@ -143,9 +143,19 @@ CommandReturnObject::SetError (const Error &error, const char *fallback_error_cs const char *error_cstr = error.AsCString(); if (error_cstr == NULL) error_cstr = fallback_error_cstr; - AppendError (error_cstr); - SetStatus (eReturnStatusFailed); + SetError(error_cstr); } + +void +CommandReturnObject::SetError (const char *error_cstr) +{ + if (error_cstr) + { + AppendError (error_cstr); + SetStatus (eReturnStatusFailed); + } +} + // Similar to AppendError, but do not prepend 'Error: ' to message, and // don't append "\n" to the end of it. |