forked from Galactic/galactic-bot
fixed an issue with error showing [object Object] instead of actual error
This commit is contained in:
parent
07d428c952
commit
9dfe472674
@ -138,7 +138,7 @@ class Shard extends EventEmitter {
|
|||||||
if(!message || message._eval !== script) return;
|
if(!message || message._eval !== script) return;
|
||||||
child.removeListener('message', listener);
|
child.removeListener('message', listener);
|
||||||
this._evals.delete(script);
|
this._evals.delete(script);
|
||||||
if(!message._error) resolve(message._result); else reject(new Error(message._error));
|
if(!message._error) resolve(message._result); else reject(new Error(message._error.stack));
|
||||||
};
|
};
|
||||||
child.on('message', listener);
|
child.on('message', listener);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user