diff --git a/libdevcore/RLP.h b/libdevcore/RLP.h index 6e46807ab..6ae9c165b 100644 --- a/libdevcore/RLP.h +++ b/libdevcore/RLP.h @@ -292,7 +292,7 @@ public: RLPs toList() const; /// @returns the data payload. Valid for all types. - bytesConstRef payload() const { auto l = length(); if (l > m_data.size()) throw BadRLP(); return m_data.cropped(payloadOffset(), l); } + bytesConstRef payload() const { auto l = length(); if (l > m_data.size()) BOOST_THROW_EXCEPTION(BadRLP()); return m_data.cropped(payloadOffset(), l); } /// @returns the theoretical size of this item. /// @note Under normal circumstances, is equivalent to m_data.size() - use that unless you know it won't work. diff --git a/libethcore/KeyManager.h b/libethcore/KeyManager.h index a2b5a4e07..0e54f3f42 100644 --- a/libethcore/KeyManager.h +++ b/libethcore/KeyManager.h @@ -46,7 +46,7 @@ struct KeyInfo static h256 const UnknownPassword; /// Password query function that never returns a password. -static auto const DontKnowThrow = [](){ throw PasswordUnknown(); return std::string(); }; +static auto const DontKnowThrow = [](){ BOOST_THROW_EXCEPTION(PasswordUnknown()); return std::string(); }; enum class SemanticPassword {