diff options
author | chriseth <c@ethdev.com> | 2017-02-24 02:42:38 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2017-02-24 02:43:40 +0800 |
commit | 4b1e8111cc2469808d08e1718d3edd64b2cc4484 (patch) | |
tree | 782afbf5c4381182c73dbdec8b5f273bd4bc00b9 /docs/control-structures.rst | |
parent | 811bb770c51bc63f9ccb2bff014482ba9c760132 (diff) | |
download | dexon-solidity-4b1e8111cc2469808d08e1718d3edd64b2cc4484.tar dexon-solidity-4b1e8111cc2469808d08e1718d3edd64b2cc4484.tar.gz dexon-solidity-4b1e8111cc2469808d08e1718d3edd64b2cc4484.tar.bz2 dexon-solidity-4b1e8111cc2469808d08e1718d3edd64b2cc4484.tar.lz dexon-solidity-4b1e8111cc2469808d08e1718d3edd64b2cc4484.tar.xz dexon-solidity-4b1e8111cc2469808d08e1718d3edd64b2cc4484.tar.zst dexon-solidity-4b1e8111cc2469808d08e1718d3edd64b2cc4484.zip |
Remove assert for now.
Diffstat (limited to 'docs/control-structures.rst')
-rw-r--r-- | docs/control-structures.rst | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/docs/control-structures.rst b/docs/control-structures.rst index f1b2e6da..019714f8 100644 --- a/docs/control-structures.rst +++ b/docs/control-structures.rst @@ -400,11 +400,7 @@ While a user-provided exception is generated in the following situations: #. Calling ``throw``. 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 or the condition of an ``assert`` call is not met. In both cases, this causes +(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. - -If contracts are written so that ``assert`` is only used to test internal conditions and ``throw`` or -``revert`` is used in case of malformed input, a formal analysis tool that verifies that the invalid -opcode can never be reached can be used to check for the absence of errors assuming valid inputs. |