Errors
Title: Errors
Common custom errors shared across contracts.
Errors
Unauthorized
Thrown when the account is not authorized to perform the action.
Intended for access control checks in contracts that do not use the ROLES module.
error Unauthorized(address account, string reason);
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | The unauthorized account. |
| reason | string | An identifier of the role or capability the account was expected to hold (e.g. "owner"). |
InvalidRecipient
Thrown when a recipient address is invalid (e.g. the zero address).
error InvalidRecipient();
BadInput
Thrown when an input argument fails.
error BadInput(string parameter);
Parameters
| Name | Type | Description |
|---|---|---|
| parameter | string | A short identifier of the offending input (e.g. the parameter name). |