Merge pull request #4082 from androlo/develop

change assert and require docs
This commit is contained in:
chriseth 2018-05-09 11:07:00 +02:00 committed by GitHub
commit aeb6a33957
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)``: