Commit a41ab09c authored by Guillaume Seguin's avatar Guillaume Seguin

Display errors when failing to load file in Plater (#463)

parent 597b994b
...@@ -238,14 +238,16 @@ class StlPlater(Plater): ...@@ -238,14 +238,16 @@ class StlPlater(Plater):
try: try:
self.load_stl(filename) self.load_stl(filename)
except: except:
dlg = wx.MessageDialog(self, _("Loading STL file failed"), _("Error"),wx.OK) dlg = wx.MessageDialog(self, _("Loading STL file failed"), _("Error"), wx.OK)
dlg.ShowModal() dlg.ShowModal()
traceback.print_exc(file = sys.stdout)
elif filename.lower().endswith(".scad"): elif filename.lower().endswith(".scad"):
try: try:
self.load_scad(filename) self.load_scad(filename)
except: except:
dlg = wx.MessageDialog(self, _("Loading OpenSCAD file failed"), _("Error"),wx.OK) dlg = wx.MessageDialog(self, _("Loading OpenSCAD file failed"), _("Error"), wx.OK)
dlg.ShowModal() dlg.ShowModal()
traceback.print_exc(file = sys.stdout)
def load_scad(self, name): def load_scad(self, name):
lf = open(name) lf = open(name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment