aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen/ContractCompiler.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-04-13 03:01:08 +0800
committerGitHub <noreply@github.com>2018-04-13 03:01:08 +0800
commit7054defdd6c202d0943c11cb87ac2748b9bdc62b (patch)
tree8a69eb34b9089b689d5f467b8cb56b4a74ad04b8 /libsolidity/codegen/ContractCompiler.cpp
parent44416d1ac65b2cfae4bb15d39bc84b1a78211baa (diff)
parent966367305ad511900bedfd9af08114a0b1307399 (diff)
downloaddexon-solidity-7054defdd6c202d0943c11cb87ac2748b9bdc62b.tar
dexon-solidity-7054defdd6c202d0943c11cb87ac2748b9bdc62b.tar.gz
dexon-solidity-7054defdd6c202d0943c11cb87ac2748b9bdc62b.tar.bz2
dexon-solidity-7054defdd6c202d0943c11cb87ac2748b9bdc62b.tar.lz
dexon-solidity-7054defdd6c202d0943c11cb87ac2748b9bdc62b.tar.xz
dexon-solidity-7054defdd6c202d0943c11cb87ac2748b9bdc62b.tar.zst
dexon-solidity-7054defdd6c202d0943c11cb87ac2748b9bdc62b.zip
Merge pull request #3364 from ethereum/revertWithReason
Revert with reason
Diffstat (limited to 'libsolidity/codegen/ContractCompiler.cpp')
-rw-r--r--libsolidity/codegen/ContractCompiler.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libsolidity/codegen/ContractCompiler.cpp b/libsolidity/codegen/ContractCompiler.cpp
index 5cb37103..0889ac7c 100644
--- a/libsolidity/codegen/ContractCompiler.cpp
+++ b/libsolidity/codegen/ContractCompiler.cpp
@@ -128,6 +128,7 @@ void ContractCompiler::appendCallValueCheck()
{
// Throw if function is not payable but call contained ether.
m_context << Instruction::CALLVALUE;
+ // TODO: error message?
m_context.appendConditionalRevert();
}
@@ -327,6 +328,7 @@ void ContractCompiler::appendFunctionSelector(ContractDefinition const& _contrac
m_context << Instruction::STOP;
}
else
+ // TODO: error message here?
m_context.appendRevert();
for (auto const& it: interfaceFunctions)