mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2024-11-14 07:06:17 +00:00
17 lines
349 B
JavaScript
17 lines
349 B
JavaScript
|
'use strict'
|
||
|
var inherits = require('inherits')
|
||
|
|
||
|
module.exports = SaveStack
|
||
|
|
||
|
function SaveStack (fn) {
|
||
|
Error.call(this)
|
||
|
Error.captureStackTrace(this, fn || SaveStack)
|
||
|
}
|
||
|
inherits(SaveStack, Error)
|
||
|
|
||
|
SaveStack.prototype.completeWith = function (er) {
|
||
|
this['__' + 'proto' + '__'] = er
|
||
|
this.stack = this.stack + '\n\n' + er.stack
|
||
|
return this
|
||
|
}
|