change assert and require docs

This commit is contained in:
Andreas Olofsson 2018-05-07 11:44:37 +02:00 committed by GitHub
parent d0bd549d85
commit 2f44aa4072
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -120,11 +120,11 @@ Error Handling
--------------
``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)``:
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)``:
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()``:
abort execution and revert state changes
``revert(string reason)``: