aboutsummaryrefslogtreecommitdiffstats
path: root/test/tools
diff options
context:
space:
mode:
authorDaniel Kirchner <daniel@ekpyron.org>2018-06-12 17:06:14 +0800
committerDaniel Kirchner <daniel@ekpyron.org>2018-06-12 17:06:14 +0800
commit9f546cfafcc4a12c6574550724a82074bb0afb66 (patch)
tree57dc1b9eb0717162d262cbeb9d528ccd3715badb /test/tools
parent8999a2f375410a29bae46b8e87a70c62036c880d (diff)
downloaddexon-solidity-9f546cfafcc4a12c6574550724a82074bb0afb66.tar.gz
dexon-solidity-9f546cfafcc4a12c6574550724a82074bb0afb66.tar.zst
dexon-solidity-9f546cfafcc4a12c6574550724a82074bb0afb66.zip
Improve exception handling in soltest and isoltest.
Diffstat (limited to 'test/tools')
-rw-r--r--test/tools/isoltest.cpp27
1 files changed, 5 insertions, 22 deletions
diff --git a/test/tools/isoltest.cpp b/test/tools/isoltest.cpp
index 100fcbf0..d4b99e9d 100644
--- a/test/tools/isoltest.cpp
+++ b/test/tools/isoltest.cpp
@@ -150,39 +150,22 @@ SyntaxTestTool::Result SyntaxTestTool::process()
m_test = unique_ptr<SyntaxTest>(new SyntaxTest(m_path.string()));
success = m_test->run(outputMessages, " ", m_formatted);
}
- catch(CompilerError const& _e)
+ catch(boost::exception const& _e)
{
FormattedScope(cout, m_formatted, {BOLD, RED}) <<
- "Exception: " << SyntaxTest::errorMessage(_e) << endl;
- return Result::Exception;
- }
- catch(InternalCompilerError const& _e)
- {
- FormattedScope(cout, m_formatted, {BOLD, RED}) <<
- "InternalCompilerError: " << SyntaxTest::errorMessage(_e) << endl;
- return Result::Exception;
- }
- catch(FatalError const& _e)
- {
- FormattedScope(cout, m_formatted, {BOLD, RED}) <<
- "FatalError: " << SyntaxTest::errorMessage(_e) << endl;
- return Result::Exception;
- }
- catch(UnimplementedFeatureError const& _e)
- {
- FormattedScope(cout, m_formatted, {BOLD, RED}) <<
- "UnimplementedFeatureError: " << SyntaxTest::errorMessage(_e) << endl;
+ "Exception during syntax test: " << boost::diagnostic_information(_e) << endl;
return Result::Exception;
}
catch (std::exception const& _e)
{
- FormattedScope(cout, m_formatted, {BOLD, RED}) << "Exception: " << _e.what() << endl;
+ FormattedScope(cout, m_formatted, {BOLD, RED}) <<
+ "Exception during syntax test: " << _e.what() << endl;
return Result::Exception;
}
catch(...)
{
FormattedScope(cout, m_formatted, {BOLD, RED}) <<
- "Unknown Exception" << endl;
+ "Unknown exception during syntax test." << endl;
return Result::Exception;
}