From 02521a164ce8fc49d6d4af584da127098c59ba2f Mon Sep 17 00:00:00 2001 From: Lefteris Karapetsas Date: Mon, 19 Jan 2015 18:58:09 +0100 Subject: Improved handling of exceptions in some Solidity Tests --- SolidityNatspecJSON.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'SolidityNatspecJSON.cpp') diff --git a/SolidityNatspecJSON.cpp b/SolidityNatspecJSON.cpp index d43aebc2..5cec0444 100644 --- a/SolidityNatspecJSON.cpp +++ b/SolidityNatspecJSON.cpp @@ -45,13 +45,9 @@ public: { m_compilerStack.parse(_code); } - catch (const std::exception& e) + catch(boost::exception const& _e) { - std::string const* extra = boost::get_error_info(e); - std::string msg = std::string("Parsing contract failed with: ") + - e.what() + std::string("\n"); - if (extra) - msg += *extra; + auto msg = std::string("Parsing contract failed with: ") + boost::diagnostic_information(_e); BOOST_FAIL(msg); } -- cgit v1.2.3