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

@@ -62,7 +62,7 @@ TDF_Label TDataStd_Current::Get (const TDF_Label& access)
// TDF_Label current;
Handle(TDataStd_Current) A;
if (!access.Data()->Root().FindAttribute (TDataStd_Current::GetID(), A)) {
Standard_DomainError::Raise("TDataStd_Current::Get : not setted");
throw Standard_DomainError("TDataStd_Current::Get : not setted");
}
return A->GetLabel();
}

View File

@@ -73,7 +73,7 @@ const Standard_GUID& TDataStd_Directory::GetID()
Handle(TDataStd_Directory) TDataStd_Directory::New (const TDF_Label& L)
{
if (L.HasAttribute()) {
Standard_DomainError::Raise("TDataStd_Directory::New : not an empty label");
throw Standard_DomainError("TDataStd_Directory::New : not an empty label");
}
Handle(TDataStd_Directory) A = new TDataStd_Directory ();
L.AddAttribute(A);

View File

@@ -61,7 +61,7 @@ Standard_Boolean TDataStd_NoteBook::Find (const TDF_Label& current,
Handle(TDataStd_NoteBook) TDataStd_NoteBook::New (const TDF_Label& label)
{
if (label.HasAttribute()) {
Standard_DomainError::Raise("TDataStd_NoteBook::New : not an empty label");
throw Standard_DomainError("TDataStd_NoteBook::New : not an empty label");
}
Handle(TDataStd_NoteBook) NB = new TDataStd_NoteBook ();
label.AddAttribute(NB);

View File

@@ -108,7 +108,7 @@ TDataStd_TreeNode::TDataStd_TreeNode () :
Standard_Boolean TDataStd_TreeNode::Append (const Handle(TDataStd_TreeNode)& TN)
{
if (!(TN->ID() == myTreeID) )
Standard_DomainError::Raise("TDataStd_TreeNode::Append : uncompatible GUID");
throw Standard_DomainError("TDataStd_TreeNode::Append : uncompatible GUID");
Handle(TDataStd_TreeNode) bid;
TN->SetNext(bid); // Deconnects from next.
@@ -138,7 +138,7 @@ Standard_Boolean TDataStd_TreeNode::Append (const Handle(TDataStd_TreeNode)& TN)
Standard_Boolean TDataStd_TreeNode::Prepend (const Handle(TDataStd_TreeNode)& TN)
{
if (!(TN->ID() == myTreeID) )
Standard_DomainError::Raise("TDataStd_TreeNode::Prepend : uncompatible GUID");
throw Standard_DomainError("TDataStd_TreeNode::Prepend : uncompatible GUID");
Handle(TDataStd_TreeNode) bid;
TN->SetPrevious(bid);
@@ -163,7 +163,7 @@ Standard_Boolean TDataStd_TreeNode::Prepend (const Handle(TDataStd_TreeNode)& TN
Standard_Boolean TDataStd_TreeNode::InsertBefore (const Handle(TDataStd_TreeNode)& TN)
{
if (!(TN->ID() == myTreeID) )
Standard_DomainError::Raise("TDataStd_TreeNode::InsertBefore : uncompatible GUID");
throw Standard_DomainError("TDataStd_TreeNode::InsertBefore : uncompatible GUID");
TN->SetFather(Father());
TN->SetPrevious(Previous());
@@ -186,7 +186,7 @@ Standard_Boolean TDataStd_TreeNode::InsertBefore (const Handle(TDataStd_TreeNode
Standard_Boolean TDataStd_TreeNode::InsertAfter (const Handle(TDataStd_TreeNode)& TN)
{
if (!(TN->ID() == myTreeID) )
Standard_DomainError::Raise("TDataStd_TreeNode::InsertAfter : uncompatible GUID");
throw Standard_DomainError("TDataStd_TreeNode::InsertAfter : uncompatible GUID");
if (HasFather() && !HasNext())
Father()->SetLast(TN);

View File

@@ -85,7 +85,7 @@ const TCollection_ExtendedString& TDataStd_Variable::Name () const
{
Handle(TDataStd_Name) N;
if (!Label().FindAttribute(TDataStd_Name::GetID(),N)) {
Standard_DomainError::Raise("TDataStd_Variable::Name : invalid model");
throw Standard_DomainError("TDataStd_Variable::Name : invalid model");
}
return N->Get();
}
@@ -109,7 +109,7 @@ Handle(TDataStd_Real) TDataStd_Variable::Real() const
{
Handle(TDataStd_Real) R;
if (!Label().FindAttribute(TDataStd_Real::GetID(),R)) {
Standard_DomainError::Raise("TDataStd_Variable::Real : invalid model");
throw Standard_DomainError("TDataStd_Variable::Real : invalid model");
}
return R;
}
@@ -140,7 +140,7 @@ Standard_Real TDataStd_Variable::Get () const
{
Handle(TDataStd_Real) R;
if (!Label().FindAttribute(TDataStd_Real::GetID(),R)) {
Standard_DomainError::Raise("TDataStd_Variable::Get : invalid model");
throw Standard_DomainError("TDataStd_Variable::Get : invalid model");
}
return R->Get();
}
@@ -177,7 +177,7 @@ void TDataStd_Variable::Desassign () const
{
Handle(TDataStd_Expression) E;
if (!Label().FindAttribute(TDataStd_Expression::GetID(),E)) {
Standard_DomainError::Raise("TDataStd_Variable::Deassign");
throw Standard_DomainError("TDataStd_Variable::Deassign");
}
Label().ForgetAttribute(E);
}
@@ -191,7 +191,7 @@ Handle(TDataStd_Expression) TDataStd_Variable::Expression () const
{
Handle(TDataStd_Expression) E;
if (!Label().FindAttribute(TDataStd_Expression::GetID(),E)) {
Standard_DomainError::Raise("TDataStd_Variable::GetExpression");
throw Standard_DomainError("TDataStd_Variable::GetExpression");
}
return E;
}