[Core] Persistence: improve NotImplemented exception presentation to user
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user