From eff81a471acdf888e3cf5bc6550bd62b465d4e06 Mon Sep 17 00:00:00 2001 From: Enrico Granata Date: Tue, 9 Jul 2013 20:14:26 +0000 Subject: Second attempt at getting the PyCallable changes in trunk Thanks to Daniel Malea for helping test this patch for Linux happiness! llvm-svn: 185965 --- lldb/source/Interpreter/CommandReturnObject.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'lldb/source/Interpreter/CommandReturnObject.cpp') 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. -- cgit v1.2.3