Comparing version 1.8.0 to 1.8.1
@@ -5,4 +5,8 @@ # Changelog | ||
No changes yet. | ||
None yet. | ||
## v1.8.1 | ||
* #39 captureStackTrace lost when inheriting from WError | ||
## v1.8.0 | ||
@@ -9,0 +13,0 @@ |
@@ -206,3 +206,3 @@ /* | ||
if (Error.captureStackTrace) { | ||
ctor = parsed.options.constructorOpt || arguments.callee; | ||
ctor = parsed.options.constructorOpt || this.constructor; | ||
Error.captureStackTrace(this, ctor); | ||
@@ -327,6 +327,2 @@ } | ||
options = parsed.options; | ||
if (!options.hasOwnProperty('constructorOpt')) { | ||
options['constructorOpt'] = SError; | ||
} | ||
VError.call(this, options, '%s', parsed.shortmessage); | ||
@@ -357,4 +353,3 @@ | ||
VError.call(this, { | ||
'cause': errors[0], | ||
'constructorOpt': MultiError | ||
'cause': errors[0] | ||
}, 'first of %d error%s', errors.length, errors.length == 1 ? '' : 's'); | ||
@@ -393,6 +388,2 @@ } | ||
options['skipCauseMessage'] = true; | ||
if (!options.hasOwnProperty('constructorOpt')) { | ||
options['constructorOpt'] = WError; | ||
} | ||
VError.call(this, options, '%s', parsed.shortmessage); | ||
@@ -399,0 +390,0 @@ |
{ | ||
"name": "verror", | ||
"version": "1.8.0", | ||
"version": "1.8.1", | ||
"description": "richer JavaScript errors", | ||
@@ -5,0 +5,0 @@ "main": "./lib/verror.js", |
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
33437
8
371