From 977fa48b77f9c83f2135ee1423a20bc0959c5bec Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 16 Dec 2014 15:06:40 +0100 Subject: [PATCH] + handle std::exception in Document::slotChangedObject --- src/Gui/Document.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Gui/Document.cpp b/src/Gui/Document.cpp index 1774ac790..21b807c50 100644 --- a/src/Gui/Document.cpp +++ b/src/Gui/Document.cpp @@ -458,11 +458,17 @@ void Document::slotChangedObject(const App::DocumentObject& Obj, const App::Prop if (viewProvider) { try { viewProvider->update(&Prop); - } catch(const Base::MemoryException& e) { + } + catch(const Base::MemoryException& e) { Base::Console().Error("Memory exception in '%s' thrown: %s\n",Obj.getNameInDocument(),e.what()); - } catch(Base::Exception &e){ + } + catch(Base::Exception& e){ e.ReportException(); - } catch (...) { + } + catch(const std::exception& e){ + Base::Console().Error("C++ exception in '%s' thrown: %s\n",Obj.getNameInDocument(),e.what()); + } + catch (...) { Base::Console().Error("Cannot update representation for '%s'.\n", Obj.getNameInDocument()); }