From 5eacc23cb1032cd851caecf43107d2c2d1a85aab Mon Sep 17 00:00:00 2001 From: subtly Date: Wed, 5 Nov 2014 16:09:39 +0100 Subject: [PATCH] use boost_throw_exception --- libdevcrypto/Common.cpp | 2 +- libdevcrypto/EC.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libdevcrypto/Common.cpp b/libdevcrypto/Common.cpp index 38d2eb934..d82098655 100644 --- a/libdevcrypto/Common.cpp +++ b/libdevcrypto/Common.cpp @@ -130,7 +130,7 @@ h256 Nonce::get(bool _commit) s_seed[i] = (byte)d(s_eng); } if (!s_seed) - throw InvalidState(); + BOOST_THROW_EXCEPTION(InvalidState()); // prevent seed reuse if process terminates abnormally writeFile(s_seedFile, bytes()); diff --git a/libdevcrypto/EC.cpp b/libdevcrypto/EC.cpp index fd64f60d0..af6d0e65e 100644 --- a/libdevcrypto/EC.cpp +++ b/libdevcrypto/EC.cpp @@ -51,7 +51,7 @@ h256 crypto::kdf(Secret const& _priv, h256 const& _hash) sha3(s.ref(), s.ref()); if (!s || !_hash || !_priv) - throw InvalidState(); + BOOST_THROW_EXCEPTION(InvalidState()); return std::move(s); } @@ -102,7 +102,7 @@ Signature crypto::sign(Secret const& _key, h256 const& _hash) Integer k(kdf(_key, _hash).data(), 32); if (k == 0) - throw InvalidState(); + BOOST_THROW_EXCEPTION(InvalidState()); k = 1 + (k % (qs - 1)); ECP::Point rp = secp256k1Params.ExponentiateBase(k);