}
catch(CTestException& e)
{
- delete[] m_ListBuffer;
+ stringstream ss;
+
+ ss << "An exception occurred trying to list tests for: " << UnicodeToAscii(m_CurrentFile) << endl;
+ StringOut(ss.str());
StringOut(e.GetMessage());
+ StringOut("\n");
m_CurrentFile.clear();
+ delete[] m_ListBuffer;
}
}
auto_ptr<CTestList> TestList;
auto_ptr<CWebService> WebService;
CTestInfo* TestInfo;
+ DWORD ErrorMode;
/* The virtual test list is of course faster, so it should be preferred over
the journaled one.
if(Configuration.DoSubmit())
WebService.reset(new CWebService());
+ /* Disable error dialogs if we're running in non-interactive mode */
+ if(!Configuration.IsInteractive())
+ ErrorMode = SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);
+
/* Get information for each test to run */
while((TestInfo = TestList->GetNextTestInfo()) != 0)
{
StringOut("\n\n");
}
+
+ /* Restore the original error mode */
+ if(!Configuration.IsInteractive())
+ SetErrorMode(ErrorMode);
}