mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #4082 from androlo/develop
change assert and require docs
This commit is contained in:
commit
aeb6a33957
@ -120,11 +120,11 @@ Error Handling
|
|||||||
--------------
|
--------------
|
||||||
|
|
||||||
``assert(bool condition)``:
|
``assert(bool condition)``:
|
||||||
throws if the condition is not met - to be used for internal errors.
|
invalidates the transaction if the condition is not met - to be used for internal errors.
|
||||||
``require(bool condition)``:
|
``require(bool condition)``:
|
||||||
throws if the condition is not met - to be used for errors in inputs or external components.
|
reverts if the condition is not met - to be used for errors in inputs or external components.
|
||||||
``require(bool condition, string message)``:
|
``require(bool condition, string message)``:
|
||||||
throws if the condition is not met - to be used for errors in inputs or external components. Also provides an error message.
|
reverts if the condition is not met - to be used for errors in inputs or external components. Also provides an error message.
|
||||||
``revert()``:
|
``revert()``:
|
||||||
abort execution and revert state changes
|
abort execution and revert state changes
|
||||||
``revert(string reason)``:
|
``revert(string reason)``:
|
||||||
|
Loading…
Reference in New Issue
Block a user