whoops 5.0.5 → 5.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.js +5 -0
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -17,6 +17,11 @@ function createErrorClass (ErrorClass) {
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
Object.defineProperty(CustomError, 'name', {
|
|
21
|
+
value: name || ErrorClass.name,
|
|
22
|
+
writable: false
|
|
23
|
+
})
|
|
24
|
+
|
|
20
25
|
// Function to create an instance, allowing use without `new`
|
|
21
26
|
function CustomErrorFactory (props) {
|
|
22
27
|
return new CustomError(props)
|