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); }