mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-05-18 07:57:31 +08:00
Coding - Use throw instead of legacy Standard_Failure::Raise (#983)
Replace Standard_*::Raise calls with throw statements for better exception handling
This commit is contained in:
committed by
dpasukhi
parent
078dfc44ae
commit
6c6f2ceb41
@@ -863,7 +863,7 @@ void BRepFill::Axe(const TopoDS_Shape& Spine,
|
||||
void BRepFill::SearchOrigin(TopoDS_Wire& W, const gp_Pnt& P, const gp_Vec& Dir, const double Tol)
|
||||
{
|
||||
if (!W.Closed())
|
||||
Standard_NoSuchObject::Raise("BRepFill::SearchOrigin : the wire must be closed");
|
||||
throw Standard_NoSuchObject("BRepFill::SearchOrigin : the wire must be closed");
|
||||
|
||||
bool NewVertex = false;
|
||||
double theparam = 1.e101, angle;
|
||||
|
||||
@@ -65,7 +65,7 @@ void BRepMesh_CurveTessellator::init()
|
||||
{
|
||||
if (myParameters.MinSize <= 0.0)
|
||||
{
|
||||
Standard_Failure::Raise("The structure \"myParameters\" is not initialized");
|
||||
throw Standard_Failure("The structure \"myParameters\" is not initialized");
|
||||
}
|
||||
|
||||
TopExp::Vertices(myEdge, myFirstVertex, myLastVertex);
|
||||
|
||||
@@ -43,7 +43,7 @@ BRepOffsetAPI_MakeEvolved::BRepOffsetAPI_MakeEvolved(const TopoDS_Shape& Spin
|
||||
{
|
||||
if (Spine.ShapeType() != TopAbs_WIRE && Spine.ShapeType() != TopAbs_FACE)
|
||||
{
|
||||
Standard_TypeMismatch::Raise("BRepOffsetAPI_MakeEvolved: face or wire is expected as a spine");
|
||||
throw Standard_TypeMismatch("BRepOffsetAPI_MakeEvolved: face or wire is expected as a spine");
|
||||
}
|
||||
if (theIsVolume)
|
||||
{
|
||||
@@ -96,7 +96,7 @@ const BRepFill_Evolved& BRepOffsetAPI_MakeEvolved::Evolved() const
|
||||
{
|
||||
if (myIsVolume)
|
||||
{
|
||||
Standard_TypeMismatch::Raise(
|
||||
throw Standard_TypeMismatch(
|
||||
"BRepOffsetAPI_MakeEvolved: myEvolved is accessed while in volume mode");
|
||||
}
|
||||
return myEvolved;
|
||||
|
||||
Reference in New Issue
Block a user