Lesson 8.1

Where handler failures escape

Trace a throwing handler through dispatch, App.handle, and the connection pump, then reproduce the unhandled rejection without opening a socket.

22 minscratch/reproduce-crash.mjs
  • Trace a synchronous throw from a handler to the rejected promise discarded by Connection._onData.
  • Explain how Promise.try turns a synchronous throw and an async rejection into the same result for dispatch.
  • State what Node's default unhandled-rejection mode does when no rejection hook is installed.
Locked

This chapter is part of the framework capstone. Chapters 1 and 2 are free to build - unlock the rest to keep going.

Unlock the depth