@namecheap/error-extender
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -96,3 +96,9 @@ 'use strict'; | ||
} | ||
Error.captureStackTrace(this, this.constructor); | ||
// Maintains proper stack trace for where our error was thrown (only available on V8) | ||
/* istanbul ignore else */ | ||
if (Error.captureStackTrace) { | ||
Error.captureStackTrace(this, this.constructor); | ||
} | ||
captureProperties(this, options); | ||
@@ -99,0 +105,0 @@ } |
@@ -9,3 +9,9 @@ 'use strict'; | ||
} | ||
Error.captureStackTrace(this, this.constructor); | ||
// Maintains proper stack trace for where our error was thrown (only available on V8) | ||
/* istanbul ignore else */ | ||
if (Error.captureStackTrace) { | ||
Error.captureStackTrace(this, this.constructor); | ||
} | ||
hro(this, 'message', message); | ||
@@ -12,0 +18,0 @@ const stackArr = this.stack.split('\n'); |
{ | ||
"name": "@namecheap/error-extender", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "error-extender", | ||
"main": "main/ErrorExtender.js", | ||
"scripts": { | ||
"test": "./node_modules/.bin/nyc ./node_modules/.bin/mocha ./**/*Test.spec.js --forbid-only --forbid-pending --reporter=\"mochawesome\" --reporter-options=\"reportDir=./test-results/mocha/,reportFilename=index.html\"" | ||
"test": "nyc mocha '**/*.spec.js' --forbid-only --forbid-pending --reporter=\"mochawesome\" --reporter-options=\"reportDir=./test-results/mocha/,reportFilename=index.html\"" | ||
}, | ||
@@ -9,0 +9,0 @@ "repository": { |
@@ -1,5 +0,8 @@ | ||
# error-extender-1.0.2 | ||
# @namecheap/error-extender | ||
Simplifies creation of custom `Error` classes for Node.js! | ||
![npm](https://img.shields.io/npm/v/@namecheap/error-extender?label=%40namecheap%2Ferror-extender) | ||
[![Actions Status](https://github.com/namecheap/error-extender/workflows/CI/badge.svg)](https://github.com/namecheap/error-extender/actions) | ||
Simplifies creation of custom `Error` classes for Node.js and Browser! | ||
...which then produces `stack` with appended stacks of supplied `cause` _(very much like in Java)_! | ||
@@ -6,0 +9,0 @@ |
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
57723
17
734
237