diff options
author | Daniel Kirchner <daniel@ekpyron.org> | 2018-06-12 17:06:14 +0800 |
---|---|---|
committer | Daniel Kirchner <daniel@ekpyron.org> | 2018-06-12 17:06:14 +0800 |
commit | 9f546cfafcc4a12c6574550724a82074bb0afb66 (patch) | |
tree | 57dc1b9eb0717162d262cbeb9d528ccd3715badb /test/libsolidity/SyntaxTest.cpp | |
parent | 8999a2f375410a29bae46b8e87a70c62036c880d (diff) | |
download | dexon-solidity-9f546cfafcc4a12c6574550724a82074bb0afb66.tar.gz dexon-solidity-9f546cfafcc4a12c6574550724a82074bb0afb66.tar.zst dexon-solidity-9f546cfafcc4a12c6574550724a82074bb0afb66.zip |
Improve exception handling in soltest and isoltest.
Diffstat (limited to 'test/libsolidity/SyntaxTest.cpp')
-rw-r--r-- | test/libsolidity/SyntaxTest.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/test/libsolidity/SyntaxTest.cpp b/test/libsolidity/SyntaxTest.cpp index 1c2355d5..430073a0 100644 --- a/test/libsolidity/SyntaxTest.cpp +++ b/test/libsolidity/SyntaxTest.cpp @@ -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(), |