diff options
author | chriseth <chris@ethereum.org> | 2017-04-27 18:14:15 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-04-27 21:06:29 +0800 |
commit | c1e14d0119910ff7edc4fc749b1190ad910a842f (patch) | |
tree | 422cbc00312a50b98dc2c95c39cc2abeae091791 /libevmasm/ConstantOptimiser.h | |
parent | 54210ea89f1f115ee9dba9008ff5ea8ddb74c839 (diff) | |
download | dexon-solidity-c1e14d0119910ff7edc4fc749b1190ad910a842f.tar.gz dexon-solidity-c1e14d0119910ff7edc4fc749b1190ad910a842f.tar.zst dexon-solidity-c1e14d0119910ff7edc4fc749b1190ad910a842f.zip |
Use OptimizerException to report error
Diffstat (limited to 'libevmasm/ConstantOptimiser.h')
-rw-r--r-- | libevmasm/ConstantOptimiser.h | 8 |
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); } |