From bbb2dccd1b650db656918f12311f04efa2495ee6 Mon Sep 17 00:00:00 2001 From: Jackson Tian Date: Fri, 1 Aug 2014 14:08:52 +0800 Subject: [PATCH] tls: throw an error, not string Reviewed-By: Fedor Indutny --- lib/_tls_wrap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js index cfe2c3e955f..48cbbf89d7d 100644 --- a/lib/_tls_wrap.js +++ b/lib/_tls_wrap.js @@ -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('^' +