Comparing version 1.1.2 to 1.1.3
@@ -47,7 +47,9 @@ var _ = require('lodash'); | ||
this.log({ error:true, id:id, message:err.message }); | ||
var stack = err.stack.split('\n'); | ||
for (var line in stack) { | ||
if (line >= this.maxErrorLines) break; | ||
this.log({ error:true, id:id, line:line, trace:stack[line] }); | ||
if (err.stack) { | ||
var stack = err.stack.split('\n'); | ||
for (var line in stack) { | ||
if (line >= this.maxErrorLines) break; | ||
this.log({ error:true, id:id, line:line, trace:stack[line] }); | ||
} | ||
} | ||
} |
{ | ||
"name": "logfmt", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "key=value logger and parser", | ||
@@ -5,0 +5,0 @@ "main": "logfmt.js", |
@@ -24,2 +24,6 @@ var logfmt = require('../logfmt'), | ||
}); | ||
test("doesn't blow up on a bad error object", function(){ | ||
logfmt.error({}) | ||
}) | ||
}) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
65056
1491