From: Luigi Pinca Date: Fri, 17 Jul 2015 11:52:37 +0000 (+0200) Subject: log the error message when the stack trace is not available X-Git-Url: https://git.saalbach.dev/?a=commitdiff_plain;h=631b914d822bdc355c2237a40c90dab02c481705;p=binbsis50.git log the error message when the stack trace is not available --- diff --git a/lib/sparks.js b/lib/sparks.js index e3c7c6a..13b4565 100644 --- a/lib/sparks.js +++ b/lib/sparks.js @@ -55,7 +55,7 @@ module.exports = function(options) { primus.on('log', function(type) { if (type === 'error') { var err = arguments[1]; - console.error(err.stack); + console.error(err.stack || err.message); } });