tls: add missing 'new'

ERR_INVALID_OPT_VALUE cannot be constructed without new.

PR-URL: https://github.com/nodejs/node/pull/27614
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
This commit is contained in:
cjihrig 2019-05-08 13:49:19 -04:00 committed by Rich Trott
parent 95c1cb4c2f
commit 10c5171d57

View File

@ -169,7 +169,7 @@ exports.createSecureContext = function createSecureContext(options) {
if (cipherSuites === '' && cipherList === '') {
// Specifying empty cipher suites for both TLS1.2 and TLS1.3 is invalid, its
// not possible to handshake with no suites.
throw ERR_INVALID_OPT_VALUE('ciphers', ciphers);
throw new ERR_INVALID_OPT_VALUE('ciphers', ciphers);
}
c.context.setCipherSuites(cipherSuites);