aboutsummaryrefslogtreecommitdiffstats
path: root/docs/control-structures.rst
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-08-08 01:46:11 +0800
committerchriseth <c@ethdev.com>2016-08-17 17:30:40 +0800
commit774bb8ab3baa9d7b5e6368dcd0f887b13ff26ae8 (patch)
treed2ba2c8f7f79c5e9d2db46a4ec748844c9968a20 /docs/control-structures.rst
parente7683f4722791d39ca63913ec98feb1ea9f5164d (diff)
downloaddexon-solidity-774bb8ab3baa9d7b5e6368dcd0f887b13ff26ae8.tar.gz
dexon-solidity-774bb8ab3baa9d7b5e6368dcd0f887b13ff26ae8.tar.zst
dexon-solidity-774bb8ab3baa9d7b5e6368dcd0f887b13ff26ae8.zip
Make function calls throw if target does not have code.
Low-level calls still just execute and will actually report "success". This allows `x.call.value(y)()` for x being a non-contract account.
Diffstat (limited to 'docs/control-structures.rst')
-rw-r--r--docs/control-structures.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/control-structures.rst b/docs/control-structures.rst
index a6daccac..5b78d099 100644
--- a/docs/control-structures.rst
+++ b/docs/control-structures.rst
@@ -69,6 +69,10 @@ this does not execute a constructor. We could also have used ``function setFeed(
only (locally) sets the value and amount of gas sent with the function call and only the
parentheses at the end perform the actual call.
+Function calls cause exceptions if the called contract does not exist (in the
+sense that the account does not contain code) or if the called contract itself
+throws an exception or goes out of gas.
+
.. warning::
Any interaction with another contract imposes a potential danger, especially
if the source code of the contract is not known in advance. The current