Poor handling of errors in JavaScript is one of the biggest pains in the ass with many codebases. It's nice to see someone cover the topic, particularly the parts most people don't even seem to realize exist, or are just too lazy to use.

Though in general I think how poorly documented this stuff is contributes to the problem. I know a few years back I caught myself brute-forcing code to recreate what already existed on console::{log, error, warn} just because I couldn't find in the ECMA specs or the MDN docs that all this stuff existed.

Hell, I went so far as to write a sprintf implementation just because I didn't know console could actually do substitution strings... probably because I didn't know what a "substitution string" was since no other language I'd used to that point used that term. I know them as "format strings".

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store