@jymfony/exceptions
Advanced tools
Comparing version 0.1.0-alpha.11 to 0.1.0-alpha.12
@@ -42,2 +42,9 @@ const UNKNOWN_FUNCTION = '?'; | ||
/** | ||
* @type {Object.<string, string>[]} | ||
* | ||
* @private | ||
*/ | ||
this._stackTrace = undefined; | ||
Error.captureStackTrace(this, this.constructor); | ||
@@ -55,3 +62,7 @@ this._originalStack = this.stack.split('\n').join('\n'); | ||
get stackTrace() { | ||
return Exception.parseStackTrace(this); | ||
if (undefined === this._stackTrace) { | ||
this._stackTrace = Exception.parseStackTrace(this); | ||
} | ||
return this._stackTrace; | ||
} | ||
@@ -78,2 +89,3 @@ | ||
_updateStack() { | ||
this._stackTrace = undefined; | ||
this.stack = this.constructor.name + ': ' + this.message + '\n\n' + this._originalStack; | ||
@@ -96,2 +108,3 @@ } | ||
for (let i = 0, j = lines.length; i < j; ++i) { | ||
regex.lastIndex = 0; | ||
if ((parts = regex.exec(lines[i]))) { | ||
@@ -98,0 +111,0 @@ element = { |
{ | ||
"name": "@jymfony/exceptions", | ||
"version": "0.1.0-alpha.11", | ||
"version": "0.1.0-alpha.12", | ||
"description": "Jymfony exception (core package)", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
9605
242