Improve exception handling in soltest and isoltest.

This commit is contained in:
Daniel Kirchner
2018-06-12 11:06:14 +02:00
parent 8999a2f375
commit 9f546cfafc
2 changed files with 15 additions and 25 deletions
+10 -3
View File
@@ -268,9 +268,16 @@ int SyntaxTest::registerTests(
[fullpath]
{
BOOST_REQUIRE_NO_THROW({
stringstream errorStream;
if (!SyntaxTest(fullpath.string()).run(errorStream))
BOOST_ERROR("Test expectation mismatch.\n" + errorStream.str());
try
{
stringstream errorStream;
if (!SyntaxTest(fullpath.string()).run(errorStream))
BOOST_ERROR("Test expectation mismatch.\n" + errorStream.str());
}
catch (boost::exception const& _e)
{
BOOST_ERROR("Exception during syntax test: " << boost::diagnostic_information(_e));
}
});
},
_path.stem().string(),