From 9c621f0982677c28db0ee5b3f044b58eb9ba39a7 Mon Sep 17 00:00:00 2001 From: Frederic Massart Date: Fri, 1 Aug 2014 15:05:23 +0800 Subject: [PATCH] JS watcher does not die when the compilation failed --- mdk/commands/js.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mdk/commands/js.py b/mdk/commands/js.py index 67b891a..34ee99b 100644 --- a/mdk/commands/js.py +++ b/mdk/commands/js.py @@ -180,5 +180,8 @@ class JsShiftWatcher(watchdog.events.FileSystemEventHandler): return logging.info('[%s] (%s) Changes detected!' % (self._M.get('identifier'), datetime.datetime.now().strftime('%H:%M:%S'))) - # How about handling exceptions here? - self._processor.shift(**self._args) + + try: + self._processor.shift(**self._args) + except js.ShifterCompileFailed: + logging.error(' /!\ Error: Compile failed!') -- 2.11.0