diff --git a/libdevcore/FixedHash.h b/libdevcore/FixedHash.h index a5b65458c..88b42f16c 100644 --- a/libdevcore/FixedHash.h +++ b/libdevcore/FixedHash.h @@ -81,7 +81,7 @@ public: explicit FixedHash(byte const* _bs, ConstructFromPointerType) { memcpy(m_data.data(), _bs, N); } /// Explicitly construct, copying from a string. - explicit FixedHash(std::string const& _s, ConstructFromStringType _t = FromHex, ConstructFromHashType _ht = FailIfDifferent): FixedHash(_t == FromHex ? fromHex(_s) : dev::asBytes(_s), _ht) {} + explicit FixedHash(std::string const& _s, ConstructFromStringType _t = FromHex, ConstructFromHashType _ht = FailIfDifferent): FixedHash(_t == FromHex ? fromHex(_s, WhenError::Throw) : dev::asBytes(_s), _ht) {} /// Convert to arithmetic type. operator Arith() const { return fromBigEndian(m_data); }