From 62b76627dbf7cb373d8d7e831f31db0a8b522c72 Mon Sep 17 00:00:00 2001 From: James Halliday Date: Thu, 2 Aug 2012 01:00:42 -0700 Subject: [PATCH] try/catch no longer necessary, syntax-error catches that now --- lib/watch.js | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/lib/watch.js b/lib/watch.js index 9c77217f5..b2ebccaba 100644 --- a/lib/watch.js +++ b/lib/watch.js @@ -43,26 +43,18 @@ function reg (self, w, opts, body, file) { pending = setTimeout(function () { pending = null; // modified - try { - if (w[type][file]) { - w.reload(file); - } - else if (type === 'entries') { - w.addEntry(file); - } - else if (type === 'files') { - w.require(file); - } - - w._cache = null; - self.emit('bundle'); + if (w[type][file]) { + w.reload(file); } - catch (e) { - self.emit('syntaxError', e); - if (self.listeners('syntaxError').length === 0) { - console.error(e && e.stack || e); - } + else if (type === 'entries') { + w.addEntry(file); } + else if (type === 'files') { + w.require(file); + } + + w._cache = null; + self.emit('bundle'); }, 100); } else if (event === 'rename') {