Use OptimizerException to report error

This commit is contained in:
chriseth
2017-04-27 14:06:29 +01:00
committed by Alex Beregszaszi
parent 54210ea89f
commit c1e14d0119
+6 -2
View File
@@ -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); }