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):
try:
self.load_stl(filename)
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()
traceback.print_exc(file = sys.stdout)
elif filename.lower().endswith(".scad"):
try:
self.load_scad(filename)
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()
traceback.print_exc(file = sys.stdout)
def load_scad(self, 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