Solidity Custom Errors: When to Ditch Revert Strings and How to Decode What Comes Back
Solidity custom errors (0.8.4+) give you typed, ABI-decodable, gas-cheaper failures than revert strings. Here's the syntax, a worked Foundry test, and the real trade-offs.