Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Error.stackTraceLimit = Infinity;
var currentStack = '';
process.addAsyncListener(function listener() {
var stack = {};
Error.captureStackTrace(stack, listener);
return { stack: stack.stack.substr(5) + currentStack };
}, {
before: function before(context, domain) {
var newStack = {};
Error.captureStackTrace(newStack, before);
domain.stack = newStack.stack.substr(5) + domain.stack;
domain.prevStack = currentStack;
currentStack = domain.stack;
},
after: function after(context, domain) {
currentStack = domain.prevStack;
domain.prevStack = null;
},
error: function error(domain, err) {
domain.stack = err.stack.substr(5) + domain.stack;
process._rawDebug('*** ERROR', domain.stack);
process.exit(1);
return true;
}
});
*** ERROR : This socket has been ended by the other party
at Socket.writeAfterFIN [as write] (net.js:265:12)
at Socket.Writable.end (_stream_writable.js:403:10)
at Socket.end (net.js:389:31)
at process._tickCallback (node.js:519:17)
at loadAsyncQueue (node.js:351:11)
at process._tickCallback (node.js:517:11)
at runAsyncQueue (node.js:319:23)
at process.nextTick (node.js:573:9)
at Socket.onend (_stream_duplex.js:68:11)
at Socket.g (events.js:190:14)
at Socket.EventEmitter.emit (events.js:125:20)
at _stream_readable.js:896:16
at process._tickCallback (node.js:519:17)
at loadAsyncQueue (node.js:351:11)
at process._tickCallback (node.js:517:11)
at runAsyncQueue (node.js:319:23)
at process.nextTick (node.js:573:9)
at endReadable (_stream_readable.js:891:13)
at Socket.Readable.read (_stream_readable.js:283:7)
at flow (_stream_readable.js:743:26)
at emitReadable_ (_stream_readable.js:419:3)
at emitReadable (_stream_readable.js:412:7)
at onEofChunk (_stream_readable.js:395:3)
at readableAddChunk (_stream_readable.js:139:7)
at Socket.Readable.push (_stream_readable.js:123:10)
at Pipe.onread (net.js:540:8)
at process.loadAsyncQueue (node.js:351:11)
at process.loadAsyncQueue (node.js:351:11)
at Pipe.runAsyncQueue (node.js:319:23)
at createPipe (child_process.js:66:10)
at child_process.js:911:39
at Array.reduce (native)
at ChildProcess.spawn (child_process.js:894:17)
at exports.spawn (child_process.js:753:9)
at Benchmark.http (/var/projects/node-trevnorris/benchmark/common.js:74:15)
at null._onTimeout (/var/projects/node-trevnorris/benchmark/http/simple.js:19:11)
at Timer.listOnTimeout (timers.js:127:21)
at loadAsyncQueue (node.js:351:11)
at Timer.listOnTimeout (timers.js:123:11)
at runAsyncQueue (node.js:319:23)
at Object.exports.active (timers.js:199:5)
at exports.setTimeout (timers.js:239:11)
at global.setTimeout (node.js:180:27)
at Benchmark.main [as fn] (/var/projects/node-trevnorris/benchmark/http/simple.js:15:3)
at Benchmark._run (/var/projects/node-trevnorris/benchmark/common.js:103:17)
at /var/projects/node-trevnorris/benchmark/common.js:59:10
at process._tickCallback (node.js:519:17)
at Function.Module.runMain (module.js:492:11)
at startup (node.js:126:16)
at node.js:978:3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.