Explore Library
Quiz

Error Propagation in EventEmitter Listeners

Understanding why errors thrown inside async EventEmitter listeners escape try/catch and how the special 'error' event behaves.

You register an async listener on an EventEmitter, and inside it an awaited operation rejects. The code that calls emitter.emit(...) is wrapped in a try/catch. What happens?