mirror of https://github.com/nodejs/node.git
tls: throw an error, not string
Reviewed-By: Fedor Indutny <fedor@indutny.com>archived-io.js-v0.10
parent
d287b8e58a
commit
bbb2dccd1b
|
@ -738,7 +738,7 @@ Server.prototype.setOptions = function(options) {
|
|||
// SNI Contexts High-Level API
|
||||
Server.prototype.addContext = function(servername, context) {
|
||||
if (!servername) {
|
||||
throw 'Servername is required parameter for Server.addContext';
|
||||
throw new Error('Servername is required parameter for Server.addContext');
|
||||
}
|
||||
|
||||
var re = new RegExp('^' +
|
||||
|
|
Loading…
Reference in New Issue