浏览代码

Including exception string in test's error output.

Ken Martin 22 年之前
父节点
当前提交
305e972df3
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      Source/cmCTest.cxx

+ 8 - 0
Source/cmCTest.cxx

@@ -3000,6 +3000,14 @@ int cmCTest::RunTest(std::vector<const char*> argv, std::string* output, int *re
   else if(result == cmsysProcess_State_Exception)
     {
     *retVal = cmsysProcess_GetExitException(cp);
+    std::string outerr = "\n*** Exception executing: ";
+    outerr += cmsysProcess_GetExceptionString(cp);
+    *output += outerr;
+    if ( m_Verbose )
+      {
+      std::cout << outerr.c_str() << "\n";
+      std::cout.flush();
+      }
     }
   else if(result == cmsysProcess_State_Error)
     {