diff options
Diffstat (limited to 'core/01_core.js')
-rw-r--r-- | core/01_core.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/01_core.js b/core/01_core.js index a2cd9e14b..a8bdeb2a8 100644 --- a/core/01_core.js +++ b/core/01_core.js @@ -20,6 +20,7 @@ PromisePrototypeThen, RangeError, ReferenceError, + ReflectHas, SafeArrayIterator, SafeMap, SafePromisePrototypeFinally, @@ -235,6 +236,9 @@ } catch (err) { // Cleanup the just-created promise getPromise(id); + if (!ReflectHas(ops, name)) { + throw new TypeError(`${name} is not a registered op`); + } // Rethrow the error throw err; } @@ -257,6 +261,9 @@ } catch (err) { // Cleanup the just-created promise getPromise(id); + if (!ReflectHas(ops, name)) { + throw new TypeError(`${name} is not a registered op`); + } // Rethrow the error throw err; } |