Player FM 앱으로 오프라인으로 전환하세요!
Throw is about control flow – not error handling
Manage episode 411765740 series 1635850
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:
196 에피소드
Manage episode 411765740 series 1635850
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:
196 에피소드
Tous les épisodes
×플레이어 FM에 오신것을 환영합니다!
플레이어 FM은 웹에서 고품질 팟캐스트를 검색하여 지금 바로 즐길 수 있도록 합니다. 최고의 팟캐스트 앱이며 Android, iPhone 및 웹에서도 작동합니다. 장치 간 구독 동기화를 위해 가입하세요.