Latrasis / linter-solidity

Atom Linter support for Solidity
Other
27 stars 10 forks source link

help me decide what I should use instead of throw (link to docs) #14

Closed ghost closed 6 years ago

ghost commented 7 years ago

help me decide which i should use link me to the docs

ghost commented 7 years ago

http://solidity.readthedocs.io/en/develop/control-structures.html?highlight=throw%20require#error-handling-assert-require-revert-and-exceptions

adibas03 commented 7 years ago

So, as described by the documentation, the functions are best in different scenarios.
require: perform checks on inputs into the function, or external variables assert: perform checks on internal values or variables in the function revert: is an alias for throw, the original call to cancel transaction and revert all state changes.

Hope this helps

ghost commented 7 years ago

Sorry, I mean I think the message should link to the documentation, or give the information you have in your comment.