From 5b4ad10b3c2bca1deee0d45bced3bde9e7438b5f Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Wed, 8 Aug 2018 13:22:33 +0100 Subject: Mark StandardCompiler::compile as noexcept It has a generic catch statement and shouldn't leak out exceptions. --- libsolidity/interface/StandardCompiler.cpp | 4 ++-- libsolidity/interface/StandardCompiler.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'libsolidity/interface') diff --git a/libsolidity/interface/StandardCompiler.cpp b/libsolidity/interface/StandardCompiler.cpp index 8339780f..58b84163 100644 --- a/libsolidity/interface/StandardCompiler.cpp +++ b/libsolidity/interface/StandardCompiler.cpp @@ -567,7 +567,7 @@ Json::Value StandardCompiler::compileInternal(Json::Value const& _input) return output; } -Json::Value StandardCompiler::compile(Json::Value const& _input) +Json::Value StandardCompiler::compile(Json::Value const& _input) noexcept { try { @@ -591,7 +591,7 @@ Json::Value StandardCompiler::compile(Json::Value const& _input) } } -string StandardCompiler::compile(string const& _input) +string StandardCompiler::compile(string const& _input) noexcept { Json::Value input; string errors; diff --git a/libsolidity/interface/StandardCompiler.h b/libsolidity/interface/StandardCompiler.h index 2772394a..fc9c3a59 100644 --- a/libsolidity/interface/StandardCompiler.h +++ b/libsolidity/interface/StandardCompiler.h @@ -47,10 +47,10 @@ public: /// Sets all input parameters according to @a _input which conforms to the standardized input /// format, performs compilation and returns a standardized output. - Json::Value compile(Json::Value const& _input); + Json::Value compile(Json::Value const& _input) noexcept; /// Parses input as JSON and peforms the above processing steps, returning a serialized JSON /// output. Parsing errors are returned as regular errors. - std::string compile(std::string const& _input); + std::string compile(std::string const& _input) noexcept; private: Json::Value compileInternal(Json::Value const& _input); -- cgit v1.2.3