Better error handling in JavaScript

How and why to use custom error types in JavaScript

Iain Collins

--

Handling errors well can be tricky. How Error() historically worked in JavaScript hasn’t made this easier, but using the Error class introduced in ES6 can be helpful

Image © Quinn Dombrowski

Throwing errors in JavaScript

--

--