use specialized exception classes
This commit is contained in:
@@ -611,7 +611,9 @@ PyObject* DocumentPy::getTempFileName(PyObject *args)
|
||||
fileName.deleteFile();
|
||||
|
||||
PyObject *p = PyUnicode_DecodeUTF8(fileName.filePath().c_str(),fileName.filePath().size(),0);
|
||||
if (!p) throw Base::Exception("UTF8 conversion failure at PropertyString::getPyObject()");
|
||||
if (!p) {
|
||||
throw Base::UnicodeError("UTF8 conversion failure at PropertyString::getPyObject()");
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user