Ditching Try/Catch - 3 Alternatives for Better Error Handling in JavaScript and TypeScript
Web Dev Simplified via YouTube
Overview
Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
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