Skip to content

Commit

Permalink
fixes 0003627: Hole fails to restore from file
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Nov 10, 2018
1 parent 07cf5b1 commit b65faef
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/App/Document.cpp
Expand Up @@ -1546,7 +1546,23 @@ Document::readObjects(Base::XMLReader& reader)
DocumentObject* pObj = getObject(name.c_str());
if (pObj) { // check if this feature has been registered
pObj->setStatus(ObjectStatus::Restore, true);
pObj->Restore(reader);
try {
pObj->Restore(reader);
}
// Try to continue only for certain exception types if not handled
// by the feature type. For all other exception types abort the process.
catch (const Base::UnicodeError &e) {
e.ReportException();
}
catch (const Base::ValueError &e) {
e.ReportException();
}
catch (const Base::IndexError &e) {
e.ReportException();
}
catch (const Base::RuntimeError &e) {
e.ReportException();
}
pObj->setStatus(ObjectStatus::Restore, false);
}
reader.readEndElement("Object");
Expand Down

0 comments on commit b65faef

Please sign in to comment.