Throw is about control flow – not error handling
Update: 2024-04-101
Description
Sam and Ryan talk about why it’s better to think of throw as a general-purpose JavaScript language feature rather than something that should only be used for error handling. They discuss the ambiguity around the phrase “error handling”, situations that call for dealing with errors locally vs. globally, and how throw can be useful for non-error control flow. They also discuss the problems with trying to shoehorn dynamic features into a static site.
Topics include:
- 0:00 - Intro
- 4:07 - Error handling vs. throw-try/catch
- 23:34 - Errors vs. Exceptions
- 31:52 - How Next.js uses throw for non-error control flow
- 40:44 - Adding a dynamic feature to a static site
Links:
Comments
Top Podcasts
The Best New Comedy Podcast Right Now – June 2024The Best News Podcast Right Now – June 2024The Best New Business Podcast Right Now – June 2024The Best New Sports Podcast Right Now – June 2024The Best New True Crime Podcast Right Now – June 2024The Best New Joe Rogan Experience Podcast Right Now – June 20The Best New Dan Bongino Show Podcast Right Now – June 20The Best New Mark Levin Podcast – June 2024
In Channel