فهرست منبع

display more precise answer if something in TCL shell fail

Kamil Sopko 10 سال پیش
والد
کامیت
3878ddb782
1فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 5 1
      FlatCAMApp.py

+ 5 - 1
FlatCAMApp.py

@@ -659,7 +659,11 @@ class App(QtCore.QObject):
             result = self.tcl.eval(str(text))
             result = self.tcl.eval(str(text))
             self.shell.append_output(result + '\n')
             self.shell.append_output(result + '\n')
         except Tkinter.TclError, e:
         except Tkinter.TclError, e:
-            self.shell.append_error('ERROR: ' + str(e) + '\n')
+            #this will display more precise answer if something in  TCL shell fail
+            result = self.tcl.eval("set errorInfo")
+            self.log.error("Exec command Exception: %s" % (str(e)+ '\n' + result + '\n'))
+            self.shell.append_error('ERROR: ' + str(e) + '\n' + result + '\n')
+            raise e
         return
         return
 
 
         """
         """