tls: throw an error, not string

Reviewed-By: Fedor Indutny <fedor@indutny.com>
archived-io.js-v0.10
Jackson Tian 2014-08-01 14:08:52 +08:00 committed by Fedor Indutny
parent d287b8e58a
commit bbb2dccd1b
1 changed files with 1 additions and 1 deletions

View File

@ -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('^' +