Discover this podcast and so much more

Podcasts are free to enjoy without a subscription. We also offer ebooks, audiobooks, and so much more for just $11.99/month.

Throw is about control flow – not error handling

Throw is about control flow – not error handling

FromFrontend First


Throw is about control flow – not error handling

FromFrontend First

ratings:
Length:
64 minutes
Released:
Apr 10, 2024
Format:
Podcast episode

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 - Intro4:07 - Error handling vs. throw-try/catch23:34 - Errors vs. Exceptions31:52 - How Next.js uses throw for non-error control flow40:44 - Adding a dynamic feature to a static siteLinks:Global progress in Next.jsWhat color is your function
Released:
Apr 10, 2024
Format:
Podcast episode

Titles in the series (100)

A podcast about modern UI development on the web. Hosted by Sam Selikoff and Ryan Toronto.