Comparing version 0.1.16 to 0.1.17
@@ -95,4 +95,6 @@ 'use strict'; | ||
var str = this.name + ': ' + this.message; | ||
if (this.cause) | ||
str += '; caused by ' + this.cause.toString(); | ||
if (this.cause) { | ||
const cause = this.cause.toString() === "[object Object]" ? this.cause.message : this.cause.toString(); | ||
str += '; caused by ' + cause; | ||
} | ||
return (str); | ||
@@ -119,2 +121,2 @@ }; | ||
module.exports = CFError; | ||
module.exports = CFError; |
{ | ||
"name": "cf-errors", | ||
"version": "0.1.16", | ||
"version": "0.1.17", | ||
"description": "Extensible error library", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
168888
816