Report the command error when we are in "stop on error mode."

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@155422 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Interpreter/CommandInterpreter.cpp b/source/Interpreter/CommandInterpreter.cpp
index 033322b..4e81407 100644
--- a/source/Interpreter/CommandInterpreter.cpp
+++ b/source/Interpreter/CommandInterpreter.cpp
@@ -2272,20 +2272,23 @@
                 
         if (!success || !tmp_result.Succeeded())
         {
+            const char *error_msg = tmp_result.GetErrorData();
+            if (error_msg == NULL || error_msg[0] == '\0')
+                error_msg = "<unknown error>.\n";
             if (stop_on_error)
             {
-                result.AppendErrorWithFormat("Aborting reading of commands after command #%d: '%s' failed.\n", 
-                                         idx, cmd);
+                result.AppendErrorWithFormat("Aborting reading of commands after command #%d: '%s' failed with %s",
+                                         idx, cmd, error_msg);
                 result.SetStatus (eReturnStatusFailed);
                 m_debugger.SetAsyncExecution (old_async_execution);
                 return;
             }
             else if (print_results)
             {
-                result.AppendMessageWithFormat ("Command #%d '%s' failed with error: %s.\n", 
+                result.AppendMessageWithFormat ("Command #%d '%s' failed with %s",
                                                 idx + 1, 
                                                 cmd, 
-                                                tmp_result.GetErrorData());
+                                                error_msg);
             }
         }