Error handling

・Assert 👉 to test for internal errors & to check constant value

Error of type Panic(uint256)

・Require👉to ensure valid conditions that cannot be detected until execution time.

This includes conditions on inputs or return values from calls to external contracts.

An Error(string)

Expressions and Control Structures - Solidity 0.8.13 documentation

Screen Shot 2022-04-28 at 10.34.10.png

An error will undo all changes made to the state during a transaction.

You can throw an error by calling requirerevert or assert.