You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
349 B
16 lines
349 B
'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
|
|
}
|