Permalink
Browse files

[fix] check for err.stack's existence in merge().

  • Loading branch information...
1 parent 034291e commit 35b10e0d927592bd878518c765af53b82e91c831 @chjj chjj committed Feb 10, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/errs.js
View
@@ -164,7 +164,7 @@ exports.merge = function (err, type, opts) {
// add human-readable errors
merged.description = err.message;
- merged.stacktrace = err.stack.split("\n");
+ merged.stacktrace = (err.stack || '').split("\n");
return merged;
};
@@ -258,4 +258,4 @@ function mixin(target) {
});
return target;
-}
+}

0 comments on commit 35b10e0

Please sign in to comment.