From fb497800508a04f071a1518bd0d1c54450f0358a Mon Sep 17 00:00:00 2001 From: Mike Smith Date: Tue, 13 Aug 2019 20:48:26 -0400 Subject: [PATCH] fix crash when opening non-projects as project files --- FlatCAMApp.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/FlatCAMApp.py b/FlatCAMApp.py index 4dd26bdb..475f8a93 100644 --- a/FlatCAMApp.py +++ b/FlatCAMApp.py @@ -8170,8 +8170,9 @@ class App(QtCore.QObject): with lzma.open(filename) as f: file_content = f.read().decode('utf-8') d = json.loads(file_content, object_hook=dict2obj) - except IOError: - App.log.error("Failed to open project file: %s" % filename) + + except Exception as e: + App.log.error("Failed to open project file: %s with error: %s" % (filename, str(e))) self.inform.emit(_("[ERROR_NOTCL] Failed to open project file: %s") % filename) return