Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Ditching Try/Catch - 3 Alternatives for Better Error Handling in JavaScript and TypeScript

Web Dev Simplified via YouTube

Overview

Explore three alternatives to try/catch blocks in JavaScript and TypeScript in this 10-minute video. Learn why try/catch can be problematic, especially when working with TypeScript, due to untyped errors, additional block scoping, and indiscriminate error catching. Discover more effective error handling techniques that address these issues. Start with an examination of the initial code, then progress through examples of poor error handling practices. Gain insights into basic fixes for common problems, and conclude with advanced solutions for robust error management in your web development projects.

Syllabus

- Introduction
- Starting Code
- Bad Error Handling
- Basic Fix
- Advanced Fix

Taught by

Web Dev Simplified

Reviews

Start your review of Ditching Try/Catch - 3 Alternatives for Better Error Handling in JavaScript and TypeScript

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.