Skip to content
Permalink
Browse files

crypto: improve error messages

Introduce a new MACRO to check if the data is a String object and
update existing MACROs to include the actual object description to
be printed in case of an error.

PR-URL: #3100
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information...
thefourtheye committed Sep 28, 2015
1 parent 8b2e437 commit 41feaa89e0f15c7d713818065af07a552728cd2e
Showing with 180 additions and 104 deletions.
  1. +1 −1 lib/_tls_wrap.js
  2. +144 −103 src/node_crypto.cc
  3. +35 −0 test/parallel/test-tls-basic-validations.js
@@ -762,7 +762,7 @@ function Server(/* [options], listener */) {
var timeout = options.handshakeTimeout || (120 * 1000);

if (typeof timeout !== 'number') {
throw new TypeError('"handshakeTimeout" option must be a number');
throw new TypeError('handshakeTimeout must be a number');
}

if (self.sessionTimeout) {

0 comments on commit 41feaa8

Please sign in to comment.
You can’t perform that action at this time.