Permalink
Browse files

[fix] Ensure err.stack exists before splitting it. Fixes #152

  • Loading branch information...
1 parent c157e14 commit d6cc51c08bd8c82258574e36e48e3303e71e6aef @indexzero indexzero committed Jul 8, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/winston/exception.js
View
2 lib/winston/exception.js
@@ -17,7 +17,7 @@ exception.getAllInfo = function (err) {
process: exception.getProcessInfo(),
os: exception.getOsInfo(),
trace: exception.getTrace(err),
- stack: err.stack.split('\n')
+ stack: err.stack && err.stack.split('\n')
};
};

0 comments on commit d6cc51c

Please sign in to comment.