[ui] error handling and reporting for Meshroom file opening

reimplement and try/except file loading method to send error signal if need be.
This commit is contained in:
Yann Lanthony 2018-04-13 22:23:39 +02:00 committed by Yann Lanthony
parent f2089108aa
commit 9e8d1f1a78

View file

@ -172,6 +172,14 @@ class Reconstruction(UIGraph):
""" Create a new photogrammetry pipeline. """
self.setGraph(multiview.photogrammetry())
def load(self, filepath):
try:
super(Reconstruction, self).load(filepath)
except Exception as e:
self.error.emit("Error while loading {}".format(os.path.basename(filepath)),
"An unexpected error has occurred",
str(e))
def onGraphChanged(self):
""" React to the change of the internal graph. """
self._liveSfmManager.reset()