From b7fa80cc2e410b3a7261a232681b3c5c217c5932 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Fri, 2 Aug 2013 12:47:22 -0500 Subject: [PATCH] fix uncaught error throwing. --- lib/events.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/events.js b/lib/events.js index 85c6204..88c7ac4 100644 --- a/lib/events.js +++ b/lib/events.js @@ -77,8 +77,7 @@ EventEmitter.prototype._emit = function(type, args) { if (!handler) { if (type === 'error') { - throw new Error('Unhandled error event: ' - + JSON.stringify(slice.call(arguments))); + throw new args[0]; } return; }