issue #1700 replace PyExc_Exception
This commit is contained in:
@@ -153,7 +153,7 @@ static PyObject * open(PyObject *self, PyObject *args)
|
||||
|
||||
// extract ending
|
||||
if (file.extension() == "")
|
||||
Py_Error(PyExc_Exception,"no file ending");
|
||||
Py_Error(Base::BaseExceptionFreeCADError,"no file ending");
|
||||
|
||||
if (file.hasExtension("stp") || file.hasExtension("step")) {
|
||||
// create new document and add Import feature
|
||||
@@ -186,7 +186,7 @@ static PyObject * open(PyObject *self, PyObject *args)
|
||||
pcDoc->recompute();
|
||||
}
|
||||
catch (const Base::Exception& e) {
|
||||
Py_Error(PyExc_Exception, e.what());
|
||||
Py_Error(Base::BaseExceptionFreeCADError, e.what());
|
||||
}
|
||||
}
|
||||
} PY_CATCH_OCC;
|
||||
@@ -208,7 +208,7 @@ static PyObject * insert(PyObject *self, PyObject *args)
|
||||
|
||||
// extract ending
|
||||
if (file.extension() == "")
|
||||
Py_Error(PyExc_Exception,"no file ending");
|
||||
Py_Error(Base::BaseExceptionFreeCADError,"no file ending");
|
||||
App::Document *pcDoc = App::GetApplication().getDocument(DocName);
|
||||
if (!pcDoc) {
|
||||
pcDoc = App::GetApplication().newDocument(DocName);
|
||||
@@ -241,7 +241,7 @@ static PyObject * insert(PyObject *self, PyObject *args)
|
||||
pcDoc->recompute();
|
||||
}
|
||||
catch (const Base::Exception& e) {
|
||||
Py_Error(PyExc_Exception, e.what());
|
||||
Py_Error(Base::BaseExceptionFreeCADError, e.what());
|
||||
}
|
||||
}
|
||||
} PY_CATCH_OCC;
|
||||
|
||||
@@ -1763,7 +1763,7 @@ Py::String TopoShapePy::getShapeType(void) const
|
||||
{
|
||||
TopoDS_Shape sh = getTopoShapePtr()->_Shape;
|
||||
if (sh.IsNull())
|
||||
throw Py::Exception(PyExc_Exception, "cannot determine type of null shape");
|
||||
throw Py::Exception(Base::BaseExceptionFreeCADError, "cannot determine type of null shape");
|
||||
TopAbs_ShapeEnum type = sh.ShapeType();
|
||||
std::string name;
|
||||
switch (type)
|
||||
@@ -1804,7 +1804,7 @@ Py::String TopoShapePy::getOrientation(void) const
|
||||
{
|
||||
TopoDS_Shape sh = getTopoShapePtr()->_Shape;
|
||||
if (sh.IsNull())
|
||||
throw Py::Exception(PyExc_Exception, "cannot determine orientation of null shape");
|
||||
throw Py::Exception(Base::BaseExceptionFreeCADError, "cannot determine orientation of null shape");
|
||||
TopAbs_Orientation type = sh.Orientation();
|
||||
std::string name;
|
||||
switch (type)
|
||||
@@ -1830,7 +1830,7 @@ void TopoShapePy::setOrientation(Py::String arg)
|
||||
{
|
||||
TopoDS_Shape& sh = getTopoShapePtr()->_Shape;
|
||||
if (sh.IsNull())
|
||||
throw Py::Exception(PyExc_Exception, "cannot determine orientation of null shape");
|
||||
throw Py::Exception(Base::BaseExceptionFreeCADError, "cannot determine orientation of null shape");
|
||||
std::string name = (std::string)arg;
|
||||
TopAbs_Orientation type;
|
||||
if (name == "Forward") {
|
||||
|
||||
Reference in New Issue
Block a user