normalize-exception
Advanced tools
Comparing version 2.5.1 to 2.5.2
@@ -37,2 +37,3 @@ import{CORE_ERROR_PROPS,getDescriptor}from"../descriptors.js"; | ||
const getPropsToCopy=function(object){ | ||
@@ -39,0 +40,0 @@ const propNames=getOwnKeys(object); |
@@ -9,2 +9,5 @@ import{setErrorProperty}from"./descriptors.js"; | ||
export const setStack=function(error){ | ||
@@ -28,5 +31,6 @@ const stack=getStack(error.message,error.name); | ||
const getErrorClass=function(name){ | ||
class StackError extends Error{} | ||
const descriptor={ | ||
@@ -39,4 +43,8 @@ value:name, | ||
Object.defineProperty(StackError,"name",descriptor); | ||
const StackError=Object.defineProperty( | ||
class extends Error{}, | ||
"name", | ||
descriptor); | ||
Object.defineProperty(StackError.prototype,"name",descriptor); | ||
@@ -43,0 +51,0 @@ return StackError; |
{ | ||
"name": "normalize-exception", | ||
"version": "2.5.1", | ||
"version": "2.5.2", | ||
"type": "module", | ||
@@ -49,4 +49,4 @@ "exports": "./build/src/main.js", | ||
"devDependencies": { | ||
"@ehmicky/dev-tasks": "^1.0.85", | ||
"test-each": "^5.3.0" | ||
"@ehmicky/dev-tasks": "^1.0.88", | ||
"test-each": "^5.4.0" | ||
}, | ||
@@ -53,0 +53,0 @@ "engines": { |
@@ -355,6 +355,6 @@ [![Codecov](https://img.shields.io/codecov/c/github/ehmicky/normalize-exception.svg?label=tested&logo=codecov)](https://codecov.io/gh/ehmicky/normalize-exception) | ||
like it's 2022 🔮 | ||
- [`error-custom-classes`](https://github.com/ehmicky/error-custom-classes): | ||
Create multiple error classes | ||
- [`error-custom-class`](https://github.com/ehmicky/error-custom-class): Create | ||
one error class | ||
- [`error-class-utils`](https://github.com/ehmicky/error-class-utils): Utilities | ||
to properly create error classes | ||
- [`error-serializer`](https://github.com/ehmicky/error-serializer): Convert | ||
@@ -364,2 +364,4 @@ errors to/from plain objects | ||
error with its `cause` | ||
- [`set-error-class`](https://github.com/ehmicky/set-error-class): Properly | ||
update an error's class | ||
- [`set-error-message`](https://github.com/ehmicky/set-error-message): Properly | ||
@@ -366,0 +368,0 @@ update an error's message |
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
35290
8356
429
403