diff --git a/src/node.js b/src/node.js index 725291c442..6cf17c1445 100644 --- a/src/node.js +++ b/src/node.js @@ -294,7 +294,9 @@ var eventsModule = createInternalModule('events', function (exports) { var self = this; process.nextTick(function() { if (self.listeners('error').length == 0) { - throw new Error('Unhandled emitError: '+JSON.stringify(self._values)); + throw (self._values[0] instanceof Error) + ? self._values[0] + : new Error('Unhandled emitError: '+JSON.stringify(self._values)); } }); }