From 046b7b5a323b7ff8669078085c0062c27cf59efd Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 6 Feb 2016 16:43:30 +0000 Subject: [PATCH] Postprocessing plugin errors: print them to stderr too Failures to run the postprocessing plugin are currently mostly ignored - they result in a message in the slicing engine log, but the slice is considered to have succeeded. Ideally slicing engine failures, and plugin failures, would be treated the same way. But currently engine errors result in a message on stderr and the slice simply not finishing in the GUI - that is, there is not even any way to view the log. Ideally there would be a `slicing failed' state for the slicing button, as well as `not yet finished'. That way the user could know that something was wrong, and know to look at the log. For now, however, just print the error message to stderr with traceback.print_exc, too, so that at least command-line users get to see something. Signed-off-by: Ian Jackson --- Cura/util/pluginInfo.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Cura/util/pluginInfo.py b/Cura/util/pluginInfo.py index 9cc05f0e..7fad6f58 100644 --- a/Cura/util/pluginInfo.py +++ b/Cura/util/pluginInfo.py @@ -156,6 +156,7 @@ def runPostProcessingPlugins(engineResult, pluginConfigList): try: execfile(pythonFile, locals) except: + traceback.print_exc() locationInfo = traceback.extract_tb(sys.exc_info()[2])[-1] return "%s: '%s' @ %s:%s:%d" % (str(sys.exc_info()[0].__name__), str(sys.exc_info()[1]), os.path.basename(locationInfo[0]), locationInfo[2], locationInfo[1]) if tempfilename is not None: -- 2.30.2