mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +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:
@@ -571,9 +571,9 @@ Standard_CString BRepMesh_Dump(void* theMeshHandlePtr,
|
||||
if (!BRepTools::Write(aMesh, theFileNameStr))
|
||||
return "Error: write failed";
|
||||
}
|
||||
catch (Standard_Failure)
|
||||
catch (Standard_Failure const& anException)
|
||||
{
|
||||
return Standard_Failure::Caught()->GetMessageString();
|
||||
return anException.GetMessageString();
|
||||
}
|
||||
|
||||
return theFileNameStr;
|
||||
|
@@ -2446,9 +2446,9 @@ Standard_CString BRepMesh_DumpPoly(void* thePolygon,
|
||||
if (!BRepTools::Write(aMesh, theFileNameStr))
|
||||
return "Error: write failed";
|
||||
}
|
||||
catch (Standard_Failure)
|
||||
catch (Standard_Failure const& anException)
|
||||
{
|
||||
return Standard_Failure::Caught()->GetMessageString();
|
||||
return anException.GetMessageString();
|
||||
}
|
||||
|
||||
return theFileNameStr;
|
||||
|
@@ -45,7 +45,7 @@ public:
|
||||
else
|
||||
{
|
||||
if (myIndex[1] >= 0)
|
||||
Standard_OutOfRange::Raise("BRepMesh_PairOfIndex::Append, more than two index to store");
|
||||
throw Standard_OutOfRange("BRepMesh_PairOfIndex::Append, more than two index to store");
|
||||
|
||||
myIndex[1] = theIndex;
|
||||
}
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
inline void Prepend(const Standard_Integer theIndex)
|
||||
{
|
||||
if (myIndex[1] >= 0)
|
||||
Standard_OutOfRange::Raise ("BRepMesh_PairOfIndex::Prepend, more than two index to store");
|
||||
throw Standard_OutOfRange("BRepMesh_PairOfIndex::Prepend, more than two index to store");
|
||||
|
||||
myIndex[1] = myIndex[0];
|
||||
myIndex[0] = theIndex;
|
||||
@@ -92,7 +92,7 @@ public:
|
||||
inline Standard_Integer Index(const Standard_Integer thePairPos) const
|
||||
{
|
||||
if (thePairPos != 1 && thePairPos != 2)
|
||||
Standard_OutOfRange::Raise ("BRepMesh_PairOfIndex::Index, requested index is out of range");
|
||||
throw Standard_OutOfRange("BRepMesh_PairOfIndex::Index, requested index is out of range");
|
||||
|
||||
return myIndex[thePairPos - 1];
|
||||
}
|
||||
@@ -104,7 +104,7 @@ public:
|
||||
const Standard_Integer theIndex)
|
||||
{
|
||||
if (thePairPos != 1 && thePairPos != 2)
|
||||
Standard_OutOfRange::Raise ("BRepMesh_PairOfIndex::SetIndex, requested index is out of range");
|
||||
throw Standard_OutOfRange("BRepMesh_PairOfIndex::SetIndex, requested index is out of range");
|
||||
|
||||
myIndex[thePairPos - 1] = theIndex;
|
||||
}
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
inline void RemoveIndex(const Standard_Integer thePairPos)
|
||||
{
|
||||
if (thePairPos != 1 && thePairPos != 2)
|
||||
Standard_OutOfRange::Raise ("BRepMesh_PairOfIndex::RemoveIndex, requested index is out of range");
|
||||
throw Standard_OutOfRange("BRepMesh_PairOfIndex::RemoveIndex, requested index is out of range");
|
||||
|
||||
if ( thePairPos == 1 )
|
||||
myIndex[0] = myIndex[1];
|
||||
|
Reference in New Issue
Block a user