This tutorial is for members only

Learn Straight from the Experts Who Shape the Modern Web

200+
In-Depth Courses
21
Learning Paths
Industry Leading Experts
Live Interactive Workshops

I'm Ditching Try/Catch for Good!

Web Dev Simplified
Web Dev Simplified
TypeScript
October 15, 2024

The try/catch block is a staple of JavaScript, but it leaves a lot to be desired (especially when working with TypeScript). None of the errors are typed, it adds an extra level of block scoping which can make certain code difficult to write, and it catches all errors (not just the ones you want). That is why in this video I will show you 3 alternatives to try/catch that I much prefer.