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:
@@ -365,9 +365,8 @@ private:
|
||||
aReader.Transfer(hDoc);
|
||||
pi->EndScope();
|
||||
}
|
||||
catch (OSD_Exception) {
|
||||
Handle(Standard_Failure) e = Standard_Failure::Caught();
|
||||
Base::Console().Error("%s\n", e->GetMessageString());
|
||||
catch (OSD_Exception& e) {
|
||||
Base::Console().Error("%s\n", e.GetMessageString());
|
||||
Base::Console().Message("Try to load STEP file without colors...\n");
|
||||
|
||||
Part::ImportStepParts(pcDoc,Utf8Name.c_str());
|
||||
@@ -401,9 +400,8 @@ private:
|
||||
Handle(IGESToBRep_Actor)::DownCast(aReader.WS()->TransferReader()->Actor())
|
||||
->SetModel(new IGESData_IGESModel);
|
||||
}
|
||||
catch (OSD_Exception) {
|
||||
Handle(Standard_Failure) e = Standard_Failure::Caught();
|
||||
Base::Console().Error("%s\n", e->GetMessageString());
|
||||
catch (OSD_Exception& e) {
|
||||
Base::Console().Error("%s\n", e.GetMessageString());
|
||||
Base::Console().Message("Try to load IGES file without colors...\n");
|
||||
|
||||
Part::ImportIgesParts(pcDoc,Utf8Name.c_str());
|
||||
@@ -427,9 +425,8 @@ private:
|
||||
pcDoc->recompute();
|
||||
hApp->Close(hDoc);
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
Handle(Standard_Failure) e = Standard_Failure::Caught();
|
||||
throw Py::Exception(Base::BaseExceptionFreeCADError, e->GetMessageString());
|
||||
catch (Standard_Failure& e) {
|
||||
throw Py::Exception(Base::BaseExceptionFreeCADError, e.GetMessageString());
|
||||
}
|
||||
catch (const Base::Exception& e) {
|
||||
throw Py::RuntimeError(e.what());
|
||||
@@ -603,9 +600,8 @@ private:
|
||||
|
||||
hApp->Close(hDoc);
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
Handle(Standard_Failure) e = Standard_Failure::Caught();
|
||||
throw Py::Exception(Base::BaseExceptionFreeCADError, e->GetMessageString());
|
||||
catch (Standard_Failure& e) {
|
||||
throw Py::Exception(Base::BaseExceptionFreeCADError, e.GetMessageString());
|
||||
}
|
||||
catch (const Base::Exception& e) {
|
||||
throw Py::RuntimeError(e.what());
|
||||
@@ -697,9 +693,8 @@ private:
|
||||
browse.load(dlg->findChild<QTreeWidget*>());
|
||||
hApp->Close(hDoc);
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
Handle(Standard_Failure) e = Standard_Failure::Caught();
|
||||
throw Py::Exception(Base::BaseExceptionFreeCADError, e->GetMessageString());
|
||||
catch (Standard_Failure& e) {
|
||||
throw Py::Exception(Base::BaseExceptionFreeCADError, e.GetMessageString());
|
||||
}
|
||||
catch (const Base::Exception& e) {
|
||||
throw Py::RuntimeError(e.what());
|
||||
|
||||
Reference in New Issue
Block a user