mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Use boost::current_exception_diagnostic_information() to print extra info about exceptions caught by (...)
This commit is contained in:
@@ -87,6 +87,10 @@ void runTestCase(TestCase::Config const& _config, TestCase::TestCaseCreator cons
|
||||
{
|
||||
BOOST_ERROR("Exception during extracted test: " << boost::diagnostic_information(_e));
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
BOOST_ERROR("Unknown exception during extracted test: " << boost::current_exception_diagnostic_information());
|
||||
}
|
||||
}
|
||||
|
||||
int registerTests(
|
||||
|
||||
@@ -112,9 +112,14 @@ bytes compileFirstExpression(
|
||||
if (!sourceUnit)
|
||||
return bytes();
|
||||
}
|
||||
catch(boost::exception const& _e)
|
||||
catch (boost::exception const& _e)
|
||||
{
|
||||
auto msg = std::string("Parsing source code failed with: \n") + boost::diagnostic_information(_e);
|
||||
string msg = "Parsing source code failed with:\n" + boost::diagnostic_information(_e);
|
||||
BOOST_FAIL(msg);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
string msg = "Parsing source code failed with:\n" + boost::current_exception_diagnostic_information();
|
||||
BOOST_FAIL(msg);
|
||||
}
|
||||
|
||||
|
||||
@@ -201,15 +201,13 @@ TestTool::Result TestTool::process()
|
||||
catch (std::exception const& _e)
|
||||
{
|
||||
AnsiColorized(cout, formatted, {BOLD, RED}) <<
|
||||
"Exception during test" <<
|
||||
(_e.what() ? ": " + string(_e.what()) : ".") <<
|
||||
endl;
|
||||
"Exception during test: " << boost::diagnostic_information(_e) << endl;
|
||||
return Result::Exception;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
AnsiColorized(cout, formatted, {BOLD, RED}) <<
|
||||
"Unknown exception during test." << endl;
|
||||
"Unknown exception during test: " << boost::current_exception_diagnostic_information() << endl;
|
||||
return Result::Exception;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user