aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libevmasm/ConstantOptimiser.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/libevmasm/ConstantOptimiser.h b/libevmasm/ConstantOptimiser.h
index 8a37b3cb..2c112b2b 100644
--- a/libevmasm/ConstantOptimiser.h
+++ b/libevmasm/ConstantOptimiser.h
@@ -23,6 +23,7 @@
#include <libevmasm/Exceptions.h>
+#include <libdevcore/Assertions.h>
#include <libdevcore/CommonData.h>
#include <libdevcore/CommonIO.h>
@@ -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); }