mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 12:20:27 +01:00
util: add some additional error classes to wellKnownPrototypes
PR-URL: https://github.com/nodejs/node/pull/59456 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
parent
64355ae97e
commit
3f51cb6229
|
|
@ -1,6 +1,8 @@
|
|||
'use strict';
|
||||
|
||||
const {
|
||||
AggregateError,
|
||||
AggregateErrorPrototype,
|
||||
Array,
|
||||
ArrayBuffer,
|
||||
ArrayBufferPrototype,
|
||||
|
|
@ -74,6 +76,8 @@ const {
|
|||
ObjectSetPrototypeOf,
|
||||
Promise,
|
||||
PromisePrototype,
|
||||
RangeError,
|
||||
RangeErrorPrototype,
|
||||
ReflectApply,
|
||||
ReflectOwnKeys,
|
||||
RegExp,
|
||||
|
|
@ -114,6 +118,8 @@ const {
|
|||
SymbolPrototypeValueOf,
|
||||
SymbolToPrimitive,
|
||||
SymbolToStringTag,
|
||||
TypeError,
|
||||
TypeErrorPrototype,
|
||||
TypedArray,
|
||||
TypedArrayPrototype,
|
||||
TypedArrayPrototypeGetLength,
|
||||
|
|
@ -636,7 +642,12 @@ const wellKnownPrototypes = new SafeMap()
|
|||
.set(RegExpPrototype, { name: 'RegExp', constructor: RegExp })
|
||||
.set(DatePrototype, { name: 'Date', constructor: Date })
|
||||
.set(DataViewPrototype, { name: 'DataView', constructor: DataView })
|
||||
|
||||
.set(ErrorPrototype, { name: 'Error', constructor: Error })
|
||||
.set(AggregateErrorPrototype, { name: 'AggregateError', constructor: AggregateError })
|
||||
.set(RangeErrorPrototype, { name: 'RangeError', constructor: RangeError })
|
||||
.set(TypeErrorPrototype, { name: 'TypeError', constructor: TypeError })
|
||||
|
||||
.set(BooleanPrototype, { name: 'Boolean', constructor: Boolean })
|
||||
.set(NumberPrototype, { name: 'Number', constructor: Number })
|
||||
.set(StringPrototype, { name: 'String', constructor: String })
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user