only log errors if there is an error

pull/1/head
ansuz 8 years ago
parent 12f581bb1c
commit 278125747c

@ -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();

Loading…
Cancel
Save