@ekino/rendr-core
Advanced tools
Comparing version 0.0.15 to 0.0.16
@@ -124,3 +124,3 @@ var __extends = (this && this.__extends) || (function () { | ||
} | ||
Object.assign(this, getErrorParameters("Error", args)); | ||
Object.assign(this, __assign(__assign({}, getErrorParameters("Rendr Error", args)), { stack: new Error().stack, name: "RendrError" })); | ||
} | ||
@@ -139,3 +139,3 @@ return RendrError; | ||
var _this = _super.call(this) || this; | ||
Object.assign(_this, __assign(__assign({}, getErrorParameters("Not Found Exception", args)), { stack: new Error().stack, name: "NotFoundError" })); | ||
Object.assign(_this, __assign(__assign({}, getErrorParameters("Not Found Error", args)), { stack: new Error().stack, name: "NotFoundError" })); | ||
return _this; | ||
@@ -142,0 +142,0 @@ } |
@@ -56,3 +56,3 @@ var __extends = (this && this.__extends) || (function () { | ||
} | ||
Object.assign(this, getErrorParameters("Error", args)); | ||
Object.assign(this, __assign(__assign({}, getErrorParameters("Rendr Error", args)), { stack: new Error().stack, name: "RendrError" })); | ||
} | ||
@@ -71,3 +71,3 @@ return RendrError; | ||
var _this = _super.call(this) || this; | ||
Object.assign(_this, __assign(__assign({}, getErrorParameters("Not Found Exception", args)), { stack: new Error().stack, name: "NotFoundError" })); | ||
Object.assign(_this, __assign(__assign({}, getErrorParameters("Not Found Error", args)), { stack: new Error().stack, name: "NotFoundError" })); | ||
return _this; | ||
@@ -74,0 +74,0 @@ } |
@@ -58,3 +58,3 @@ "use strict"; | ||
} | ||
Object.assign(this, getErrorParameters("Error", args)); | ||
Object.assign(this, __assign(__assign({}, getErrorParameters("Rendr Error", args)), { stack: new Error().stack, name: "RendrError" })); | ||
} | ||
@@ -73,3 +73,3 @@ return RendrError; | ||
var _this = _super.call(this) || this; | ||
Object.assign(_this, __assign(__assign({}, getErrorParameters("Not Found Exception", args)), { stack: new Error().stack, name: "NotFoundError" })); | ||
Object.assign(_this, __assign(__assign({}, getErrorParameters("Not Found Error", args)), { stack: new Error().stack, name: "NotFoundError" })); | ||
return _this; | ||
@@ -76,0 +76,0 @@ } |
{ | ||
"name": "@ekino/rendr-core", | ||
"license": "MIT", | ||
"version": "0.0.15", | ||
"version": "0.0.16", | ||
"main": "dist/lib/index.js", | ||
@@ -22,3 +22,3 @@ "typing": "dist/lib/index.d.ts", | ||
}, | ||
"gitHead": "5c773d43e512291a844b999855ee6d6b23b0cc79" | ||
"gitHead": "42720e423cf54b2976e74fe476d588c891becb91" | ||
} |
@@ -11,3 +11,3 @@ import { | ||
class: NotFoundError, | ||
message: "Not Found Exception", | ||
message: "Not Found Error", | ||
name: "NotFoundError" | ||
@@ -34,2 +34,4 @@ }, | ||
expect(err instanceof error.class).toBeTruthy(); | ||
expect(err instanceof Error).toBeTruthy(); | ||
expect(err.stack).toBeDefined(); | ||
expect(err.toString()).toEqual(`${error.name}: ${error.message}`); | ||
@@ -36,0 +38,0 @@ }); |
@@ -45,3 +45,7 @@ // https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work | ||
constructor(...args: any[]) { | ||
Object.assign(this, getErrorParameters("Error", args)); | ||
Object.assign(this, { | ||
...getErrorParameters("Rendr Error", args), | ||
stack: new Error().stack, | ||
name: "RendrError" | ||
}); | ||
} | ||
@@ -57,3 +61,3 @@ } | ||
Object.assign(this, { | ||
...getErrorParameters("Not Found Exception", args), | ||
...getErrorParameters("Not Found Error", args), | ||
stack: new Error().stack, | ||
@@ -60,0 +64,0 @@ name: "NotFoundError" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
151403
2938