Coding task · Blockchain and Web3 course · Module 6: Solidity Basics

Custom error

Simulate a custom error in JavaScript using the Error class.

Task

Create an InsufficientBalanceError class extending Error and use it in a function