Port to occ7.2:

+ Standard_Failure::Caught() is now marked as deprecated and should be replaced with standard C++ exception handling
This commit is contained in:
wmayer
2017-09-01 14:16:24 +02:00
parent 5aa60a4d3b
commit 949c86d364
96 changed files with 1497 additions and 1714 deletions

View File

@@ -148,9 +148,9 @@ private:
}
}
}
catch (Standard_Failure) {
Handle(Standard_Failure) e = Standard_Failure::Caught();
throw Py::Exception(Part::PartExceptionOCCError, e->GetMessageString());
catch (Standard_Failure& e) {
throw Py::Exception(Part::PartExceptionOCCError, e.GetMessageString());
}
if (edgeList.empty()) {
@@ -206,9 +206,9 @@ private:
}
}
}
catch (Standard_Failure) {
Handle(Standard_Failure) e = Standard_Failure::Caught();
throw Py::Exception(Part::PartExceptionOCCError, e->GetMessageString());
catch (Standard_Failure& e) {
throw Py::Exception(Part::PartExceptionOCCError, e.GetMessageString());
}
if (edgeList.empty()) {
@@ -270,9 +270,9 @@ private:
try {
edgeList = DrawProjectSplit::getEdgesForWalker(shape,scale,dir);
}
catch (Standard_Failure) {
Handle(Standard_Failure) e = Standard_Failure::Caught();
throw Py::Exception(Part::PartExceptionOCCError, e->GetMessageString());
catch (Standard_Failure& e) {
throw Py::Exception(Part::PartExceptionOCCError, e.GetMessageString());
}
if (edgeList.empty()) {

View File

@@ -255,19 +255,17 @@ App::DocumentObjectExecReturn *DrawViewDetail::execute(void)
try {
extractFaces();
}
catch (Standard_Failure) {
Handle(Standard_Failure) e4 = Standard_Failure::Caught();
Base::Console().Log("LOG - DVD::execute - extractFaces failed for %s - %s **\n",getNameInDocument(),e4->GetMessageString());
return new App::DocumentObjectExecReturn(e4->GetMessageString());
catch (Standard_Failure& e4) {
Base::Console().Log("LOG - DVD::execute - extractFaces failed for %s - %s **\n",getNameInDocument(),e4.GetMessageString());
return new App::DocumentObjectExecReturn(e4.GetMessageString());
}
}
#endif //#if MOD_TECHDRAW_HANDLE_FACES
}
catch (Standard_Failure) {
Handle(Standard_Failure) e1 = Standard_Failure::Caught();
Base::Console().Log("LOG - DVD::execute - base shape failed for %s - %s **\n",getNameInDocument(),e1->GetMessageString());
return new App::DocumentObjectExecReturn(e1->GetMessageString());
catch (Standard_Failure& e1) {
Base::Console().Log("LOG - DVD::execute - base shape failed for %s - %s **\n",getNameInDocument(),e1.GetMessageString());
return new App::DocumentObjectExecReturn(e1.GetMessageString());
}

View File

@@ -153,10 +153,9 @@ App::DocumentObjectExecReturn *DrawViewMulti::execute(void)
extractFaces();
#endif //#if MOD_TECHDRAW_HANDLE_FACES
}
catch (Standard_Failure) {
Handle(Standard_Failure) e1 = Standard_Failure::Caught();
Base::Console().Log("LOG - DVM::execute - projection failed for %s - %s **\n",getNameInDocument(),e1->GetMessageString());
return new App::DocumentObjectExecReturn(e1->GetMessageString());
catch (Standard_Failure& e1) {
Base::Console().Log("LOG - DVM::execute - projection failed for %s - %s **\n",getNameInDocument(),e1.GetMessageString());
return new App::DocumentObjectExecReturn(e1.GetMessageString());
}
return App::DocumentObject::StdReturn;

View File

@@ -192,10 +192,9 @@ App::DocumentObjectExecReturn *DrawViewPart::execute(void)
try {
extractFaces();
}
catch (Standard_Failure) {
Handle(Standard_Failure) e4 = Standard_Failure::Caught();
Base::Console().Log("LOG - DVP::execute - extractFaces failed for %s - %s **\n",getNameInDocument(),e4->GetMessageString());
return new App::DocumentObjectExecReturn(e4->GetMessageString());
catch (Standard_Failure& e4) {
Base::Console().Log("LOG - DVP::execute - extractFaces failed for %s - %s **\n",getNameInDocument(),e4.GetMessageString());
return new App::DocumentObjectExecReturn(e4.GetMessageString());
}
}
#endif //#if MOD_TECHDRAW_HANDLE_FACES

View File

@@ -264,10 +264,9 @@ App::DocumentObjectExecReturn *DrawViewSection::execute(void)
extractFaces();
#endif //#if MOD_TECHDRAW_HANDLE_FACES
}
catch (Standard_Failure) {
Handle(Standard_Failure) e1 = Standard_Failure::Caught();
Base::Console().Log("LOG - DVS::execute - base shape failed for %s - %s **\n",getNameInDocument(),e1->GetMessageString());
return new App::DocumentObjectExecReturn(e1->GetMessageString());
catch (Standard_Failure& e1) {
Base::Console().Log("LOG - DVS::execute - base shape failed for %s - %s **\n",getNameInDocument(),e1.GetMessageString());
return new App::DocumentObjectExecReturn(e1.GetMessageString());
}
try {
@@ -295,10 +294,9 @@ App::DocumentObjectExecReturn *DrawViewSection::execute(void)
}
sectionFaces = newFaces;
}
catch (Standard_Failure) {
Handle(Standard_Failure) e2 = Standard_Failure::Caught();
Base::Console().Log("LOG - DVS::execute - failed building section faces for %s - %s **\n",getNameInDocument(),e2->GetMessageString());
return new App::DocumentObjectExecReturn(e2->GetMessageString());
catch (Standard_Failure& e2) {
Base::Console().Log("LOG - DVS::execute - failed building section faces for %s - %s **\n",getNameInDocument(),e2.GetMessageString());
return new App::DocumentObjectExecReturn(e2.GetMessageString());
}
return App::DocumentObject::StdReturn;