1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +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

@@ -126,7 +126,7 @@ void XSControl_Controller::Record (const Standard_CString theName) const
if (newadapt->IsKind(thisadapt->DynamicType()))
return;
if (!(thisadapt->IsKind(newadapt->DynamicType())) && thisadapt != newadapt)
Standard_DomainError::Raise("XSControl_Controller : Record");
throw Standard_DomainError("XSControl_Controller : Record");
}
listad.Bind(theName, this);
}

View File

@@ -106,9 +106,9 @@ IFSelect_ReturnStatus XSControl_TransferWriter::TransferWriteTransient
status = myController->TransferWriteTransient
(obj,myTransferWriter,model,myTransferMode);
}
catch(Standard_Failure) {
catch(Standard_Failure const& anException) {
sout<<"**** **** TransferWriteShape, EXCEPTION : ";
sout<<Standard_Failure::Caught()->GetMessageString();
sout<<anException.GetMessageString();
sout<<endl;
status = IFSelect_RetFail;
}
@@ -154,9 +154,9 @@ IFSelect_ReturnStatus XSControl_TransferWriter::TransferWriteShape
status = myController->TransferWriteShape
(shape,myTransferWriter,model,myTransferMode);
}
catch(Standard_Failure) {
catch(Standard_Failure const& anException) {
sout<<"**** **** TransferWriteShape, EXCEPTION : ";
sout<<Standard_Failure::Caught()->GetMessageString();
sout<<anException.GetMessageString();
sout<<endl;
status = IFSelect_RetFail;
}

View File

@@ -138,7 +138,7 @@ static const Standard_ExtString voidext = { 0 };
DeclareAndCast(TColStd_HSequenceOfTransient,seqt,seqval);
if (!seqt.IsNull())
{ if (num <= seqt->Length()) val = seqt->Value(num); return val; }
// Standard_TypeMismatch::Raise("XSControl_Utils::SeqTraValue");
// throw Standard_TypeMismatch("XSControl_Utils::SeqTraValue");
return val;
}
@@ -515,7 +515,7 @@ static const Standard_ExtString voidext = { 0 };
if (!seqh.IsNull()) return seqh->Length();
DeclareAndCast(TColStd_HSequenceOfInteger,seqi,seqval);
if (!seqi.IsNull()) return seqi->Length();
// Standard_TypeMismatch::Raise("XSControl_Utils::SeqLength");
// throw Standard_TypeMismatch("XSControl_Utils::SeqLength");
return 0;
}
@@ -541,8 +541,7 @@ static const Standard_ExtString voidext = { 0 };
for (i = 1; i <= lng; i ++) arrt->SetValue (i-first+1,seqt->Value(i));
return arrt;
}
Standard_TypeMismatch::Raise("XSControl_Utils::SeqToArr");
return val;
throw Standard_TypeMismatch("XSControl_Utils::SeqToArr");
}
@@ -570,8 +569,7 @@ static const Standard_ExtString voidext = { 0 };
for (i = first; i <= last; i ++) seqt->Append (arrt->Value(i));
return seqt;
}
Standard_TypeMismatch::Raise("XSControl_Utils::ArrToSeq");
return val;
throw Standard_TypeMismatch("XSControl_Utils::ArrToSeq");
}