@0xhamed
Error handling in Solidity
An error will undo all changes made to the state during a transaction.
- require is used to validate inputs and conditions before execution.
- revert is similar to require. See the code below for details.
- assert is used to check for code that should never be false.