DEV Community

Discussion on: Switch-cased Error Handling in JavaScript

Collapse
 
zirkelc profile image
Chris Cook

I find it difficult to apply such patterns (especially e instaceof <class>) because in JS it's not obvious what the errors that you have to catch and handle could be. In other language such as C#, Java, etc. the thows signature gives you this information, but in JS you have to hope it's documented somewhere.