From 278125747c555859e41beaabf97a6ceb26c0da28 Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 13 Jun 2017 11:18:14 +0200 Subject: [PATCH] only log errors if there is an error --- rpc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpc.js b/rpc.js index 9f143f45e..6e555ae4a 100644 --- a/rpc.js +++ b/rpc.js @@ -20,7 +20,7 @@ var SESSION_EXPIRATION_TIME = 60 * 1000; var SUPPRESS_RPC_ERRORS = false; var WARN = function (e, output) { - if (!SUPPRESS_RPC_ERRORS) { + if (!SUPPRESS_RPC_ERRORS && e && output) { console.error(new Date().toISOString() + ' [' + e + ']', output); console.error(new Error(e).stack); console.error();