Skip to content

Commit

Permalink
utils: add invalid constructor error.
Browse files Browse the repository at this point in the history
  • Loading branch information
chjj committed Jun 11, 2019
1 parent 8fcad44 commit 2a9c61e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/internal/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const {custom} = require('./custom');
// - MISSING_PLATFORM
// - NEUTERED_BUFFER


const errors = {
// Type Errors
INVALID_LIST: 'Transfer list must be undefined, null, or an Array.',
Expand Down Expand Up @@ -88,6 +89,11 @@ const errors = {
'Cannot serialize externalized SharedArrayBuffer'
],

INVALID_CONSTRUCTOR: [ // See: https://github.com/nodejs/node/pull/28032
'ERR_CONSTRUCT_CALL_INVALID',
'Constructor cannot be called'
],

INVALID_OBJECT: [
'ERR_INVALID_TRANSFER_OBJECT',
'Found invalid object in transferList'
Expand Down

0 comments on commit 2a9c61e

Please sign in to comment.