From: Daid Date: Wed, 3 Apr 2013 14:36:57 +0000 (+0200) Subject: Properly catch and print the run exception. X-Git-Tag: 13.05~128 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=3646de55d9acb47b98b8d5baeda26e33c5bf2b90;p=cura.git Properly catch and print the run exception. --- diff --git a/Cura/util/sliceEngine.py b/Cura/util/sliceEngine.py index 1bb26364..725a2b60 100644 --- a/Cura/util/sliceEngine.py +++ b/Cura/util/sliceEngine.py @@ -4,11 +4,14 @@ import numpy import os import warnings import threading +import traceback from Cura.util import profile def getEngineFilename(): - return 'C:/Software/Cura_SteamEngine/_bin/Release/Cura_SteamEngine.exe' + if os.file.exists('C:/Software/Cura_SteamEngine/_bin/Release/Cura_SteamEngine.exe') + return 'C:/Software/Cura_SteamEngine/_bin/Release/Cura_SteamEngine.exe' + return 'SteamEngine' def getTempFilename(): warnings.simplefilter('ignore') @@ -58,10 +61,13 @@ class Slicer(object): self._objCount += 1 if self._objCount > 0: print ' '.join(commandList) - self._process = self._runSliceProcess(commandList) - self._thread = threading.Thread(target=self._watchProcess) - self._thread.daemon = True - self._thread.start() + try: + self._process = self._runSliceProcess(commandList) + self._thread = threading.Thread(target=self._watchProcess) + self._thread.daemon = True + self._thread.start() + except OSError: + traceback.print_exc() def _watchProcess(self): self._callback(0.0, False)