aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--SolidityABIJSON.cpp8
-rw-r--r--SolidityNatspecJSON.cpp8
-rw-r--r--solidityExecutionFramework.h8
3 files changed, 6 insertions, 18 deletions
diff --git a/SolidityABIJSON.cpp b/SolidityABIJSON.cpp
index d553f576..892b71f1 100644
--- a/SolidityABIJSON.cpp
+++ b/SolidityABIJSON.cpp
@@ -41,13 +41,9 @@ public:
{
m_compilerStack.parse(_code);
}
- catch (const std::exception& e)
+ catch(boost::exception const& _e)
{
- std::string const* extra = boost::get_error_info<errinfo_comment>(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);
}
std::string generatedInterfaceString = m_compilerStack.getMetadata("", DocumentationType::ABI_INTERFACE);
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<errinfo_comment>(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);
}
diff --git a/solidityExecutionFramework.h b/solidityExecutionFramework.h
index 1aea61fe..271a594c 100644
--- a/solidityExecutionFramework.h
+++ b/solidityExecutionFramework.h
@@ -50,13 +50,9 @@ public:
{
compiler.compile(_sourceCode, m_optimize);
}
- catch (const std::exception& e)
+ catch(boost::exception const& _e)
{
- std::string const* extra = boost::get_error_info<errinfo_comment>(e);
- std::string msg = std::string("Parsing contract failed with: ") +
- e.what() + std::string("\n");
- if (extra)
- msg += *extra;
+ auto msg = std::string("Compiling contract failed with: ") + boost::diagnostic_information(_e);
BOOST_FAIL(msg);
}