Skip to content

Commit 2a9c61e

Browse files
committed
utils: add invalid constructor error.
See: nodejs/node#28032
1 parent 8fcad44 commit 2a9c61e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/internal/utils.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const {custom} = require('./custom');
2323
// - MISSING_PLATFORM
2424
// - NEUTERED_BUFFER
2525

26+
2627
const errors = {
2728
// Type Errors
2829
INVALID_LIST: 'Transfer list must be undefined, null, or an Array.',
@@ -88,6 +89,11 @@ const errors = {
8889
'Cannot serialize externalized SharedArrayBuffer'
8990
],
9091

92+
INVALID_CONSTRUCTOR: [ // See: https://github.com/nodejs/node/pull/28032
93+
'ERR_CONSTRUCT_CALL_INVALID',
94+
'Constructor cannot be called'
95+
],
96+
9197
INVALID_OBJECT: [
9298
'ERR_INVALID_TRANSFER_OBJECT',
9399
'Found invalid object in transferList'

0 commit comments

Comments
 (0)