do not replace stack in async_proxy, add as workerStack

This commit is contained in:
Bart Butler 2017-11-28 10:25:16 -08:00
parent 318d86e5e9
commit 59d99fc0c7

View File

@ -67,7 +67,8 @@ AsyncProxy.prototype.onMessage = function(event) {
if (msg.err) {
// fail
const err = new Error(msg.err);
err.stack = msg.stack || err.stack;
// add worker stack
err.workerStack = msg.stack;
this.tasks[msg.id].reject(err);
} else {
// success