From fba0ace0e0305246e46a8ef565d5cc83815009d0 Mon Sep 17 00:00:00 2001 From: Mihail Stoykov <312246+mstoykov@users.noreply.github.com> Date: Thu, 24 Oct 2024 10:54:13 +0300 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Dmitry Panov --- builtin_promise.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin_promise.go b/builtin_promise.go index aa589722..1cd2348a 100644 --- a/builtin_promise.go +++ b/builtin_promise.go @@ -604,8 +604,8 @@ func (r *Runtime) wrapPromiseReaction(fObj *Object) func(interface{}) error { } // NewPromise creates and returns a Promise and resolving functions for it. -// The returned errors will be Interrupt errors that should be propagated upwards. -// Exceptions are handle through [PromiseRejectionTracker]. +// The returned errors will be uncatchable errors, such as InterruptedError or StackOverflowError, which should be propagated upwards. +// Exceptions are handled through [PromiseRejectionTracker]. // // WARNING: The returned values are not goroutine-safe and must not be called in parallel with VM running. // In order to make use of this method you need an event loop such as the one in goja_nodejs (https://github.com/dop251/goja_nodejs)