From 67efe1f00fdcbba06ff63a6b129effabf1f8eaca Mon Sep 17 00:00:00 2001 From: Nitzan Uziely Date: Thu, 4 Feb 2021 15:31:47 +0200 Subject: [PATCH] events: change EventTarget handler exception behavior Change the behavior of EventTarget, instead of emitting 'error' on handler exception, emit 'uncaughtException'. Fixes: #36770 --- doc/api/events.md | 3 +++ lib/internal/event_target.js | 12 ++++++------ test/parallel/test-eventtarget.js | 12 +++++++----- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/doc/api/events.md b/doc/api/events.md index cd2d7fc6137945..0307bab2a990e2 100644 --- a/doc/api/events.md +++ b/doc/api/events.md @@ -1137,6 +1137,9 @@ setMaxListeners(5, target, emitter);