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:
@@ -233,13 +233,13 @@ App::DocumentObjectExecReturn *Pad::execute(void)
|
||||
|
||||
return App::DocumentObject::StdReturn;
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
Handle(Standard_Failure) e = Standard_Failure::Caught();
|
||||
if (std::string(e->GetMessageString()) == "TopoDS::Face")
|
||||
catch (Standard_Failure& e) {
|
||||
|
||||
if (std::string(e.GetMessageString()) == "TopoDS::Face")
|
||||
return new App::DocumentObjectExecReturn("Could not create face from sketch.\n"
|
||||
"Intersecting sketch entities or multiple faces in a sketch are not allowed.");
|
||||
else
|
||||
return new App::DocumentObjectExecReturn(e->GetMessageString());
|
||||
return new App::DocumentObjectExecReturn(e.GetMessageString());
|
||||
}
|
||||
catch (Base::Exception& e) {
|
||||
return new App::DocumentObjectExecReturn(e.what());
|
||||
|
||||
Reference in New Issue
Block a user