mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Replace raw throw with BOOST_THROW_EXCEPTION.
This commit is contained in:
@@ -95,7 +95,7 @@ u256 EVMInstructionInterpreter::eval(
|
||||
switch (_instruction)
|
||||
{
|
||||
case Instruction::STOP:
|
||||
throw ExplicitlyTerminated();
|
||||
BOOST_THROW_EXCEPTION(ExplicitlyTerminated());
|
||||
// --------------- arithmetic ---------------
|
||||
case Instruction::ADD:
|
||||
return arg[0] + arg[1];
|
||||
@@ -328,18 +328,18 @@ u256 EVMInstructionInterpreter::eval(
|
||||
if (accessMemory(arg[0], arg[1]))
|
||||
data = readMemory(arg[0], arg[1]);
|
||||
logTrace(_instruction, arg, data);
|
||||
throw ExplicitlyTerminated();
|
||||
BOOST_THROW_EXCEPTION(ExplicitlyTerminated());
|
||||
}
|
||||
case Instruction::REVERT:
|
||||
accessMemory(arg[0], arg[1]);
|
||||
logTrace(_instruction, arg);
|
||||
throw ExplicitlyTerminated();
|
||||
BOOST_THROW_EXCEPTION(ExplicitlyTerminated());
|
||||
case Instruction::INVALID:
|
||||
logTrace(_instruction);
|
||||
throw ExplicitlyTerminated();
|
||||
BOOST_THROW_EXCEPTION(ExplicitlyTerminated());
|
||||
case Instruction::SELFDESTRUCT:
|
||||
logTrace(_instruction, arg);
|
||||
throw ExplicitlyTerminated();
|
||||
BOOST_THROW_EXCEPTION(ExplicitlyTerminated());
|
||||
case Instruction::POP:
|
||||
break;
|
||||
// --------------- invalid in strict assembly ---------------
|
||||
@@ -527,6 +527,6 @@ void EVMInstructionInterpreter::logTrace(std::string const& _pseudoInstruction,
|
||||
if (m_state.maxTraceSize > 0 && m_state.trace.size() >= m_state.maxTraceSize)
|
||||
{
|
||||
m_state.trace.emplace_back("Trace size limit reached.");
|
||||
throw TraceLimitReached();
|
||||
BOOST_THROW_EXCEPTION(TraceLimitReached());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user