From: Frederic Massart Date: Fri, 1 Aug 2014 07:05:23 +0000 (+0800) Subject: JS watcher does not die when the compilation failed X-Git-Tag: v1.4~31 X-Git-Url: https://git.cameron1729.xyz/?a=commitdiff_plain;h=9c621f0982677c28db0ee5b3f044b58eb9ba39a7;p=mdk.git JS watcher does not die when the compilation failed --- 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!')