Miscellaneous
Various niche examples which don’t yet have a dedicated page, but are useful and interesting nonetheless.
How to throw errors
The throw()
function in a contract is useful when we don’t know how often to perform a specific action.
It allows intentional exception or error handling, which leads to the termination of the current transaction and reverts any state changes made during that transaction.
▶️ Open in Web IDE