Browse Source

Including exception string in test's error output.

Ken Martin 22 years ago
parent
commit
305e972df3
1 changed files with 8 additions and 0 deletions
  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)
   else if(result == cmsysProcess_State_Exception)
     {
     {
     *retVal = cmsysProcess_GetExitException(cp);
     *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)
   else if(result == cmsysProcess_State_Error)
     {
     {