ES6+ Asynchronous Programming and Practical Error Handling
summary
Shows a concrete ES6+ example that sums image heights where loadImage returns a Promise but wrong URLs and unordered load events cause missing heights and retries that produce duplicate side effects (double POSTs). Presents a rewrite that passes dependencies as arguments, uses Promise/async–await composition and a small resolver/channel pattern to sequence calls, and argues that composing pure async functions while allowing errors to bubble yields simpler, more reliable error handling and global failure reporting.
AI-written summary · about
chapters (8)
- 0:00ES6+ async intro
- 4:03Image heights with Promises
- 8:31Error handling matters
- 14:52Async error handling
- 21:18Pure functions and errors
- 28:36Error handling best practices
- 33:23Functional error handling
- 37:50Q&A
related talks
45mNext Generation Asynchronous Patterns in JavaScript
31mPromises and Generators: control flow utopia
32mPromises Are So Passé
41mNext Generation Asynchronous Patterns in JavaScript
42mBeyond Promises: Async Patterns in JavaScript
26mNow and .then: Debugging Async JS
32mJavaScript 7: the Evolution of JavaScript
33mAsync Functions Awaiting You
