diff options
author | Jaime van Kessel <nallath@gmail.com> | 2019-09-24 10:24:36 +0300 |
---|---|---|
committer | Jaime van Kessel <nallath@gmail.com> | 2019-09-24 10:24:36 +0300 |
commit | 3ab0b5decf85ba109aaa6c58f5ecf66b43ab1c30 (patch) | |
tree | d33b9851430f3a5ab86ae836d7026e4afeeb3aac /plugins/UFPWriter | |
parent | fae4138b79f6942870e841a3d198755189a10d16 (diff) |
Add extra exception handling for UFPwriter
Diffstat (limited to 'plugins/UFPWriter')
-rw-r--r-- | plugins/UFPWriter/UFPWriter.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/UFPWriter/UFPWriter.py b/plugins/UFPWriter/UFPWriter.py index 2aece1092a..9306e0fa4e 100644 --- a/plugins/UFPWriter/UFPWriter.py +++ b/plugins/UFPWriter/UFPWriter.py @@ -38,7 +38,11 @@ class UFPWriter(MeshWriter): def _createSnapshot(self, *args): # must be called from the main thread because of OpenGL Logger.log("d", "Creating thumbnail image...") - self._snapshot = Snapshot.snapshot(width = 300, height = 300) + try: + self._snapshot = Snapshot.snapshot(width = 300, height = 300) + except Exception: + Logger.logException("w", "Failed to create snapshot image") + self._snapshot = None # Failing to create thumbnail should not fail creation of UFP # This needs to be called on the main thread (Qt thread) because the serialization of material containers can # trigger loading other containers. Because those loaded containers are QtObjects, they must be created on the |