aboutsummaryrefslogtreecommitdiffstats
path: root/docs/control-structures.rst
diff options
context:
space:
mode:
authorYoichi Hirai <i@yoichihirai.com>2017-03-04 01:25:50 +0800
committerGitHub <noreply@github.com>2017-03-04 01:25:50 +0800
commitcfbbd89dafca57e450f6b4433eb258e6a7f52310 (patch)
tree52a31928bfbe1c32ada53ec1008438a931cb2c98 /docs/control-structures.rst
parent6bfd894f46d12f78e2ea49a58f96763a077bcf49 (diff)
parent4b1e8111cc2469808d08e1718d3edd64b2cc4484 (diff)
downloaddexon-solidity-cfbbd89dafca57e450f6b4433eb258e6a7f52310.tar.gz
dexon-solidity-cfbbd89dafca57e450f6b4433eb258e6a7f52310.tar.zst
dexon-solidity-cfbbd89dafca57e450f6b4433eb258e6a7f52310.zip
Merge pull request #1702 from ethereum/assertError
Change effect of assert to invalid opcode.
Diffstat (limited to 'docs/control-structures.rst')
-rw-r--r--docs/control-structures.rst3
1 files changed, 1 insertions, 2 deletions
diff --git a/docs/control-structures.rst b/docs/control-structures.rst
index ebc45965..83d3eac9 100644
--- a/docs/control-structures.rst
+++ b/docs/control-structures.rst
@@ -399,10 +399,9 @@ Currently, Solidity automatically generates a runtime exception in the following
While a user-provided exception is generated in the following situations:
#. Calling ``throw``.
-#. The condition of ``assert(condition)`` is not met.
Internally, Solidity performs a revert operation (instruction ``0xfd``) when a user-provided exception is thrown. In contrast, it performs an invalid operation
(instruction ``0xfe``) if a runtime exception is encountered. In both cases, this causes
the EVM to revert all changes made to the state. The reason for this is that there is no safe way to continue execution, because an expected effect
did not occur. Because we want to retain the atomicity of transactions, the safest thing to do is to revert all changes and make the whole transaction
-(or at least call) without effect. \ No newline at end of file
+(or at least call) without effect.