From c1e14d0119910ff7edc4fc749b1190ad910a842f Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 27 Apr 2017 12:14:15 +0200 Subject: [PATCH] Use OptimizerException to report error --- libevmasm/ConstantOptimiser.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libevmasm/ConstantOptimiser.h b/libevmasm/ConstantOptimiser.h index 8a37b3cbc..2c112b2be 100644 --- a/libevmasm/ConstantOptimiser.h +++ b/libevmasm/ConstantOptimiser.h @@ -23,6 +23,7 @@ #include +#include #include #include @@ -133,8 +134,11 @@ public: ConstantOptimisationMethod(_params, _value) { m_routine = findRepresentation(m_value); - if (!checkRepresentation(m_value)) - BOOST_THROW_EXCEPTION(AssemblyException()); + assertThrow( + checkRepresentation(m_value), + OptimizerException, + "Invalid constant expression created." + ); } virtual bigint gasNeeded() override { return gasNeeded(m_routine); }