Use the REVERT opcode for throw;

This commit is contained in:
Alex Beregszaszi
2017-02-10 22:41:09 +00:00
parent 1fcad8b4ab
commit 586d156f33
+3 -1
View File
@@ -762,7 +762,9 @@ bool ContractCompiler::visit(Return const& _return)
bool ContractCompiler::visit(Throw const& _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;
}