mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Use the REVERT opcode for throw;
This commit is contained in:
parent
1fcad8b4ab
commit
586d156f33
@ -762,7 +762,9 @@ bool ContractCompiler::visit(Return const& _return)
|
|||||||
bool ContractCompiler::visit(Throw const& _throw)
|
bool ContractCompiler::visit(Throw const& _throw)
|
||||||
{
|
{
|
||||||
CompilerContext::LocationSetter locationSetter(m_context, _throw);
|
CompilerContext::LocationSetter locationSetter(m_context, _throw);
|
||||||
m_context.appendJumpTo(m_context.errorTag());
|
// Do not send back an error detail.
|
||||||
|
m_context << u256(0) << u256(0);
|
||||||
|
m_context << Instruction::REVERT;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user