mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Use OptimizerException to report error
This commit is contained in:
parent
54210ea89f
commit
c1e14d0119
@ -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); }
|
||||
|
Loading…
Reference in New Issue
Block a user