From 322cd887a62c27644250bcc0077ceaecce8595ca Mon Sep 17 00:00:00 2001 From: Benjamin Gruenbaum Date: Thu, 11 Feb 2021 14:03:56 +0200 Subject: [PATCH] code review --- doc/api/events.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/events.md b/doc/api/events.md index c6a796f5e83992..9b9b92034e2725 100644 --- a/doc/api/events.md +++ b/doc/api/events.md @@ -1249,13 +1249,13 @@ target.addEventListener('foo', handler4, { once: true }); When a registered event listener throws (or returns a Promise that rejects), by default the error is treated as an uncaught exception on `process.nextTick()`. This means uncaught exceptions in `EventTarget`s will -crash the Node.js process by default. +terminate the Node.js process by default. Throwing within an event listener will *not* stop the other registered handlers from being invoked. The `EventTarget` does not implement any special default handling for `'error'` -type events like `EventEmitter` does in order to be spec compliant. +type events like `EventEmitter`. Currently errors are first forwarded to the `process.on('error')` event before reaching `process.on('uncaughtException')` - this behaviour is