[Core] Persistence: improve NotImplemented exception presentation to user

This commit is contained in:
0penBrain
2022-04-08 10:55:31 +02:00
committed by wwmayer
parent 1928bfed63
commit a2beab798b
+4
View File
@@ -70,6 +70,10 @@ PyObject* PersistencePy::dumpContent(PyObject *args, PyObject *kwds)
try {
getPersistencePtr()->dumpToStream(stream, compression);
}
catch(Base::NotImplementedError&) {
PyErr_SetString(PyExc_NotImplementedError, "Dumping content of this object type is not implemented");
return nullptr;
}
catch (...) {
PyErr_SetString(PyExc_IOError, "Unable to parse content into binary representation");
return nullptr;