mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user