From 1be8c73dca09449ff1a89b94a47659d54573fdc1 Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 16 May 2017 23:48:55 +0200 Subject: [PATCH] handle possible exceptions from onDocumentRestored() --- src/App/Document.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/App/Document.cpp b/src/App/Document.cpp index 198e22c204..59b0c4276f 100644 --- a/src/App/Document.cpp +++ b/src/App/Document.cpp @@ -1591,8 +1591,13 @@ void Document::restore (void) // reset all touched for (std::map::iterator It= d->objectMap.begin();It!=d->objectMap.end();++It) { It->second->connectRelabelSignals(); - It->second->onDocumentRestored(); - It->second->ExpressionEngine.onDocumentRestored(); + try { + It->second->onDocumentRestored(); + It->second->ExpressionEngine.onDocumentRestored(); + } + catch (const Base::Exception& e) { + Base::Console().Error("Error in %s: %s\n", It->second->Label.getValue(), e.what()); + } It->second->purgeTouched(); }