From d79ebcac2b168c3c009b5ea3cfa5d2a8a3e10cef 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 +++++++----- .../test-process-uncaught-exception-monitor.js | 14 +++++++------- 4 files changed, 23 insertions(+), 18 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);