make-error-cause
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -20,3 +20,3 @@ var __extends = (this && this.__extends) || function (d, b) { | ||
BaseError.prototype.toString = function () { | ||
return _super.prototype.toString.call(this) + (this.cause ? "\nCaused by: " + this.cause.message : ''); | ||
return _super.prototype.toString.call(this) + (this.cause ? "\nCaused by: " + this.cause.toString() : ''); | ||
}; | ||
@@ -23,0 +23,0 @@ return BaseError; |
@@ -8,4 +8,7 @@ var test = require('blue-tape'); | ||
var error = new TestError('something bad', cause); | ||
var again = new TestError('more bad', error); | ||
t.equal(error.cause, cause); | ||
t.equal(error.toString(), 'TestError: something bad\nCaused by: boom!'); | ||
t.equal(error.toString(), 'TestError: something bad\nCaused by: Error: boom!'); | ||
t.equal(again.cause, error); | ||
t.equal(again.toString(), 'TestError: more bad\nCaused by: TestError: something bad\nCaused by: Error: boom!'); | ||
t.end(); | ||
@@ -12,0 +15,0 @@ }); |
{ | ||
"name": "make-error-cause", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Make your own error types, with a cause!", | ||
@@ -17,3 +17,3 @@ "main": "dist/index.js", | ||
"test": "npm run lint && npm run test-cov", | ||
"prepublish": "npm run build" | ||
"prepublish": "typings install && npm run build" | ||
}, | ||
@@ -48,3 +48,4 @@ "repository": { | ||
"tslint": "^3.1.1", | ||
"typescript": "^1.7.3" | ||
"typescript": "^1.7.3", | ||
"typings": "^0.3.1" | ||
}, | ||
@@ -51,0 +52,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
8273
67
8