From 0b85632c9772d5c7103ce16d6749c9cc7764cb33 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Mon, 1 Aug 2016 17:22:19 +1000 Subject: [PATCH] ripemd: panic rather than throw in constexpr calculating the hash should never need to throw; all error cases should be detectable at construction time. we should panic if we detect such an error. this fixes a compilation warning --- hash/ripemd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hash/ripemd.cpp b/hash/ripemd.cpp index 2d5376bc..73f9c415 100644 --- a/hash/ripemd.cpp +++ b/hash/ripemd.cpp @@ -86,7 +86,7 @@ RIPEMD::update (const void *restrict _data, size_t len) noexcept } if (m_length >> sizeof (m_length) * 8 - 3 != 0) - throw std::length_error ("exceeded maximum message length"); + panic ("exceeded maximum message length"); }