Ditching Try/Catch - 3 Alternatives for Better Error Handling in JavaScript and TypeScript
Web Dev Simplified via YouTube
Future-Proof Your Career: AI Manager Masterclass
2,000+ Free Courses with Certificates: Coding, AI, SQL, and More
Overview
Google, IBM & Meta Certificates — All 10,000+ Courses at 40% Off
One annual plan covers every course and certificate on Coursera. 40% off for a limited time.
Get Full Access
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