1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-08 14:17:06 +03:00

0026937: Eliminate NO_CXX_EXCEPTION macro support

Macro NO_CXX_EXCEPTION was removed from code.
Method Raise() was replaced by explicit throw statement.
Method Standard_Failure::Caught() was replaced by normal C++mechanism of exception transfer.
Method Standard_Failure::Caught() is deprecated now.
Eliminated empty constructors.
Updated samples.
Eliminate empty method ChangeValue from NCollection_Map class.
Removed not operable methods from NCollection classes.
This commit is contained in:
ski
2017-02-02 16:35:21 +03:00
committed by apn
parent 0c63f2f8b9
commit 9775fa6110
1146 changed files with 4860 additions and 6183 deletions

View File

@@ -61,7 +61,7 @@ Handle(TPrsStd_AISPresentation) TPrsStd_AISPresentation::Set
// create associated data (unless already there)
Handle(TDataXtd_Presentation) aData = TDataXtd_Presentation::Set (theLabel, theDriver);
if(aData.IsNull())
Standard_NoMoreObject::Raise (NO_MORE_OBJECT);
throw Standard_NoMoreObject(NO_MORE_OBJECT);
if ( !theLabel.FindAttribute(TPrsStd_AISPresentation::GetID(), aPresentation) )
{
aPresentation = new TPrsStd_AISPresentation();
@@ -102,7 +102,7 @@ Handle(TDataXtd_Presentation) TPrsStd_AISPresentation::getData () const
{
Handle(TDataXtd_Presentation) aData;
if (!Label().FindAttribute(TDataXtd_Presentation::GetID(), aData))
Standard_NoMoreObject::Raise (NO_MORE_OBJECT);
throw Standard_NoMoreObject(NO_MORE_OBJECT);
return aData;
}

View File

@@ -48,7 +48,7 @@ Handle(TPrsStd_AISViewer) TPrsStd_AISViewer::New (const TDF_Label& acces,
{
Handle(TPrsStd_AISViewer) V;
if (acces.Root().FindAttribute(TPrsStd_AISViewer::GetID(),V)) {
Standard_DomainError::Raise("already done");
throw Standard_DomainError("already done");
}
V = new TPrsStd_AISViewer();
V->SetInteractiveContext (new AIS_InteractiveContext(viewer));
@@ -76,7 +76,7 @@ Handle(TPrsStd_AISViewer) TPrsStd_AISViewer::New (const TDF_Label& acces,
{
Handle(TPrsStd_AISViewer) V;
if (acces.Root().FindAttribute(TPrsStd_AISViewer::GetID(),V)) {
Standard_DomainError::Raise("already done");
throw Standard_DomainError("already done");
}
V = new TPrsStd_AISViewer();
V->SetInteractiveContext (IC);

View File

@@ -1088,7 +1088,7 @@ void TPrsStd_ConstraintTools::ComputeConcentric(const Handle(TDataXtd_Constraint
{
Standard_Integer nbgeom = aConst->NbGeometries();
if (nbgeom < 2) {
Standard_ProgramError::Raise ("TPrsStd_ConstraintTools::ComputeConcentric: at least 2 constraintes are needed");
throw Standard_ProgramError("TPrsStd_ConstraintTools::ComputeConcentric: at least 2 constraintes are needed");
}
if (!aConst->IsPlanar()) {
#ifdef OCCT_DEBUG
@@ -1939,8 +1939,7 @@ void TPrsStd_ConstraintTools::ComputePlacement
{
Standard_Integer nbgeom = aConst->NbGeometries();
if (nbgeom < 2)
Standard_ProgramError::Raise
("TPrsStd_ConstraintTools::ComputePlacement: at leat two constraints are needed");
throw Standard_ProgramError("TPrsStd_ConstraintTools::ComputePlacement: at leat two constraints are needed");
TopoDS_Shape shape1,shape2 ;
GetTwoShapes(aConst,shape1,shape2);