diff options
author | Florian Dold <florian.dold@gmail.com> | 2018-09-20 02:56:13 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2018-09-20 02:56:13 +0200 |
commit | bbff7403fbf46f9ad92240ac213df8d30ef31b64 (patch) | |
tree | c58400ec5124da1c7d56b01aea83309f80a56c3b /node_modules/error-ex | |
parent | 003fb34971cf63466184351b4db5f7c67df4f444 (diff) | |
download | wallet-core-bbff7403fbf46f9ad92240ac213df8d30ef31b64.tar.xz |
update packages
Diffstat (limited to 'node_modules/error-ex')
-rw-r--r-- | node_modules/error-ex/index.js | 16 | ||||
-rw-r--r-- | node_modules/error-ex/package.json | 2 |
2 files changed, 13 insertions, 5 deletions
diff --git a/node_modules/error-ex/index.js b/node_modules/error-ex/index.js index 43641b08f..4fb20b487 100644 --- a/node_modules/error-ex/index.js +++ b/node_modules/error-ex/index.js @@ -51,20 +51,28 @@ var errorEx = function errorEx(name, properties) { } }); + var overwrittenStack = null; + var stackDescriptor = Object.getOwnPropertyDescriptor(this, 'stack'); var stackGetter = stackDescriptor.get; var stackValue = stackDescriptor.value; delete stackDescriptor.value; delete stackDescriptor.writable; + stackDescriptor.set = function (newstack) { + overwrittenStack = newstack; + }; + stackDescriptor.get = function () { - var stack = (stackGetter) - ? stackGetter.call(this).split(/\r?\n+/g) - : stackValue.split(/\r?\n+/g); + var stack = (overwrittenStack || ((stackGetter) + ? stackGetter.call(this) + : stackValue)).split(/\r?\n+/g); // starting in Node 7, the stack builder caches the message. // just replace it. - stack[0] = this.name + ': ' + this.message; + if (!overwrittenStack) { + stack[0] = this.name + ': ' + this.message; + } var lineCount = 1; for (var key in properties) { diff --git a/node_modules/error-ex/package.json b/node_modules/error-ex/package.json index 7a5a303a3..f3d9ae0e3 100644 --- a/node_modules/error-ex/package.json +++ b/node_modules/error-ex/package.json @@ -1,7 +1,7 @@ { "name": "error-ex", "description": "Easy error subclassing and stack customization", - "version": "1.3.1", + "version": "1.3.2", "maintainers": [ "Josh Junon <i.am.qix@gmail.com> (github.com/qix-)", "Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)" |