Glossary

`revert(message)` or `revert CustomError()`

Use when the condition logic is more complex than a single boolean check, or when you want to use custom errors (introduced in Solidity 0.8.4) for gas savings.

Learn More

Related Terms