JavaScript Error Handling in Depth for Pythonistas

Stephen Gruppetta 14 Lessons 2h 10m Updated intermediate js py

Python names your exception classes, keeps the original error when you raise a new one, and catches groups with except*. Port each of those line by line and the code runs but quietly does less: write except* BadRowError as an instanceof BadRowError check, and where Python reports three bad rows, the JavaScript port crashes with AggregateError: 3 bad rows in november.csv.

In this course, you’ll port a community food bank’s monthly donation import, which reports every bad row together and imports nothing until the whole month is ready.

By the end of this course, you’ll be able to:

  • Define a family of error classes for your program’s different failures
  • Keep the original error with cause when you wrap it in a clearer one
  • Report several failures together with AggregateError
  • Pause a running script and step through it with node inspect, Chrome DevTools, or VS Code
  • Port the whole all-or-nothing import to JavaScript

You’ll need Python’s custom exception classes, raise ... from, exception groups, and pdb. You’ll also need Node 26 and JavaScript classes with extends and super(), plus try/catch, throw, and instanceof. The Python examples use Python 3.15.

The course mixes short videos and text lessons with exercises, a project that ports the whole import, and a quiz.

What’s Included:

  • 14 Lessons
  • Video Subtitles and Full Transcripts
  • Translated Subtitles in 8 Languages
  • 2 Downloadable Resources
  • Interactive Quiz to Check Your Progress
  • 4 Hands-On Coding Exercises
  • Q&A With JavaScript Experts: Ask a Question
  • Certificate of Completion

Downloadable Resources:

Related Learning Paths:

About Stephen Gruppetta

Stephen obtained a PhD in physics and worked as a physicist in academia for over a decade before becoming a programming educator. He's constantly looking for simple ways to explain complex things.

» More about Stephen

← Browse All Courses