Example code of propagating the result of the partial restore

This commit is contained in:
Abdullah Tahiri
2018-11-16 18:04:08 +01:00
committed by wmayer
parent 714604e58f
commit 1b152ee689
6 changed files with 50 additions and 7 deletions

View File

@@ -205,6 +205,9 @@ PyObject* Application::sOpenDocument(PyObject * /*self*/, PyObject *args)
// return new document
return (GetApplication().openDocument(EncodedName.c_str())->getPyObject());
}
catch(const Base::RestoreError) {
throw; // propagate it to python/gui
}
catch (const Base::Exception& e) {
PyErr_SetString(PyExc_IOError, e.what());
return 0L;