issue #1700 replace PyExc_Exception

This commit is contained in:
Sebastian Hoogen
2014-08-29 21:12:45 +02:00
committed by wmayer
parent 1bc2e5d430
commit d49528b27e
21 changed files with 64 additions and 64 deletions

View File

@@ -106,13 +106,13 @@ PyObject* DocumentPy::setEdit(PyObject *args)
return NULL; // NULL triggers exception
App::DocumentObject * obj = getDocumentPtr()->getDocument()->getObject(psFeatStr);
if (!obj) {
PyErr_Format(PyExc_Exception, "No such object found in document: '%s'", psFeatStr);
PyErr_Format(Base::BaseExceptionFreeCADError, "No such object found in document: '%s'", psFeatStr);
return 0;
}
bool ok = getDocumentPtr()->setEdit(getDocumentPtr()->getViewProvider(obj),mod);
if (!ok) {
PyErr_Format(PyExc_Exception, "Failed to set object '%s' in edit mode", psFeatStr);
PyErr_Format(Base::BaseExceptionFreeCADError, "Failed to set object '%s' in edit mode", psFeatStr);
return 0;
}
@@ -227,7 +227,7 @@ PyObject* DocumentPy::mdiViewsOfType(PyObject *args)
Base::Type type = Base::Type::fromName(sType);
if (type == Base::Type::badType()) {
PyErr_Format(PyExc_Exception, "'%s' is not a valid type", sType);
PyErr_Format(Base::BaseExceptionFreeCADError, "'%s' is not a valid type", sType);
return NULL;
}