Artwork

Content provided by Frontend First, Sam Selikoff, and Ryan Toronto. All podcast content including episodes, graphics, and podcast descriptions are uploaded and provided directly by Frontend First, Sam Selikoff, and Ryan Toronto or their podcast platform partner. If you believe someone is using your copyrighted work without your permission, you can follow the process outlined here https://player.fm/legal.
Player FM - Podcast App
Go offline with the Player FM app!

Throw is about control flow – not error handling

1:04:11
 
Share
 

Manage episode 411765740 series 1635850
Content provided by Frontend First, Sam Selikoff, and Ryan Toronto. All podcast content including episodes, graphics, and podcast descriptions are uploaded and provided directly by Frontend First, Sam Selikoff, and Ryan Toronto or their podcast platform partner. If you believe someone is using your copyrighted work without your permission, you can follow the process outlined here https://player.fm/legal.

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:

  continue reading

185 episodes

Artwork
iconShare
 
Manage episode 411765740 series 1635850
Content provided by Frontend First, Sam Selikoff, and Ryan Toronto. All podcast content including episodes, graphics, and podcast descriptions are uploaded and provided directly by Frontend First, Sam Selikoff, and Ryan Toronto or their podcast platform partner. If you believe someone is using your copyrighted work without your permission, you can follow the process outlined here https://player.fm/legal.

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:

  continue reading

185 episodes

All episodes

×
 
Loading …

Welcome to Player FM!

Player FM is scanning the web for high-quality podcasts for you to enjoy right now. It's the best podcast app and works on Android, iPhone, and the web. Signup to sync subscriptions across devices.

 

Quick Reference Guide