1
0
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:
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

@@ -263,7 +263,7 @@ Standard_Integer Graphic3d_ArrayOfPrimitives::AddBound (const Standard_Integer t
Standard_Integer anIndex = myBounds->NbBounds;
if (anIndex >= myMaxBounds)
{
Standard_OutOfRange::Raise ("TOO many BOUNDS");
throw Standard_OutOfRange("TOO many BOUNDS");
}
myBounds->Bounds[anIndex] = theEdgeNumber;
@@ -289,7 +289,7 @@ Standard_Integer Graphic3d_ArrayOfPrimitives::AddBound (const Standard_Integer t
Standard_Integer anIndex = myBounds->NbBounds;
if (anIndex >= myMaxBounds)
{
Standard_OutOfRange::Raise ("TOO many BOUND");
throw Standard_OutOfRange("TOO many BOUND");
}
myBounds->Bounds[anIndex] = theEdgeNumber;
@@ -308,14 +308,14 @@ Standard_Integer Graphic3d_ArrayOfPrimitives::AddEdge (const Standard_Integer th
Standard_Integer anIndex = myIndices->NbElements;
if (anIndex >= myMaxEdges)
{
Standard_OutOfRange::Raise ("TOO many EDGE");
throw Standard_OutOfRange("TOO many EDGE");
}
Standard_Integer aVertIndex = theVertexIndex - 1;
if (theVertexIndex <= 0
|| aVertIndex >= myMaxVertexs)
{
Standard_OutOfRange::Raise ("BAD EDGE vertex index");
throw Standard_OutOfRange("BAD EDGE vertex index");
}
myIndices->SetIndex (anIndex, aVertIndex);
@@ -349,7 +349,7 @@ void Graphic3d_ArrayOfPrimitives::SetVertexColor (const Standard_Integer theInde
if (theIndex < 1
|| theIndex > myMaxVertexs)
{
Standard_OutOfRange::Raise ("BAD VERTEX index");
throw Standard_OutOfRange("BAD VERTEX index");
}
if (myVCol != 0)

View File

@@ -144,7 +144,7 @@ inline void Graphic3d_ArrayOfPrimitives::SetVertice (const Standard_Integer th
if (theIndex < 1
|| theIndex > myMaxVertexs)
{
Standard_OutOfRange::Raise ("BAD VERTEX index");
throw Standard_OutOfRange("BAD VERTEX index");
}
Graphic3d_Vec3& aVec = myAttribs->ChangeValue<Graphic3d_Vec3> (theIndex - 1);
@@ -168,7 +168,7 @@ inline void Graphic3d_ArrayOfPrimitives::SetVertexColor (const Standard_Integer
if (theIndex < 1
|| theIndex > myMaxVertexs)
{
Standard_OutOfRange::Raise ("BAD VERTEX index");
throw Standard_OutOfRange("BAD VERTEX index");
}
if (myVCol != 0)
@@ -200,7 +200,7 @@ inline void Graphic3d_ArrayOfPrimitives::SetVertexNormal (const Standard_Integer
if (theIndex < 1
|| theIndex > myMaxVertexs)
{
Standard_OutOfRange::Raise ("BAD VERTEX index");
throw Standard_OutOfRange("BAD VERTEX index");
}
if (myVNor != 0)
@@ -225,7 +225,7 @@ inline void Graphic3d_ArrayOfPrimitives::SetVertexTexel (const Standard_Integer
if (theIndex < 1
|| theIndex > myMaxVertexs)
{
Standard_OutOfRange::Raise ("BAD VERTEX index");
throw Standard_OutOfRange("BAD VERTEX index");
}
if (myVTex != 0)
@@ -250,7 +250,7 @@ inline void Graphic3d_ArrayOfPrimitives::SetBoundColor (const Standard_Integer t
if (theIndex < 1
|| theIndex > myMaxBounds)
{
Standard_OutOfRange::Raise ("BAD BOUND index");
throw Standard_OutOfRange("BAD BOUND index");
}
Graphic3d_Vec4& aVec = myBounds->Colors[theIndex - 1];
@@ -275,7 +275,7 @@ inline void Graphic3d_ArrayOfPrimitives::Vertice (const Standard_Integer theInde
if (theIndex < 1
|| theIndex > myAttribs->NbElements)
{
Standard_OutOfRange::Raise ("BAD VERTEX index");
throw Standard_OutOfRange("BAD VERTEX index");
}
const Graphic3d_Vec3& aVec = myAttribs->Value<Graphic3d_Vec3> (theIndex - 1);
@@ -298,7 +298,7 @@ inline void Graphic3d_ArrayOfPrimitives::VertexColor (const Standard_Integer the
if (theIndex < 1
|| theIndex > myAttribs->NbElements)
{
Standard_OutOfRange::Raise ("BAD VERTEX index");
throw Standard_OutOfRange("BAD VERTEX index");
}
Standard_Integer aColorInt = 0;
VertexColor (theIndex, aColorInt);
@@ -331,7 +331,7 @@ inline void Graphic3d_ArrayOfPrimitives::VertexNormal (const Standard_Integer th
if (theIndex < 1
|| theIndex > myAttribs->NbElements)
{
Standard_OutOfRange::Raise ("BAD VERTEX index");
throw Standard_OutOfRange("BAD VERTEX index");
}
if (myVNor != 0)
@@ -356,7 +356,7 @@ inline void Graphic3d_ArrayOfPrimitives::VertexTexel (const Standard_Integer the
if (theIndex < 1
|| theIndex > myAttribs->NbElements)
{
Standard_OutOfRange::Raise ("BAD VERTEX index");
throw Standard_OutOfRange("BAD VERTEX index");
}
if (myVTex != 0)
@@ -378,7 +378,7 @@ inline Standard_Integer Graphic3d_ArrayOfPrimitives::Edge (const Standard_Intege
|| theIndex <= 0
|| theIndex > myIndices->NbElements)
{
Standard_OutOfRange::Raise ("BAD EDGE index");
throw Standard_OutOfRange("BAD EDGE index");
}
return Standard_Integer(myIndices->Index (theIndex - 1) + 1);
}
@@ -399,7 +399,7 @@ inline Standard_Integer Graphic3d_ArrayOfPrimitives::Bound (const Standard_Integ
|| theIndex <= 0
|| theIndex > myBounds->NbBounds)
{
Standard_OutOfRange::Raise ("BAD BOUND index");
throw Standard_OutOfRange("BAD BOUND index");
}
return myBounds->Bounds[theIndex - 1];
}
@@ -414,7 +414,7 @@ inline void Graphic3d_ArrayOfPrimitives::BoundColor (const Standard_Integer theI
|| theIndex <= 0
|| theIndex > myBounds->NbBounds)
{
Standard_OutOfRange::Raise(" BAD BOUND index");
throw Standard_OutOfRange(" BAD BOUND index");
}
const Graphic3d_Vec4& aVec = myBounds->Colors[theIndex - 1];

View File

@@ -64,6 +64,6 @@ Graphic3d_AspectFillArea3d::Graphic3d_AspectFillArea3d (const Aspect_InteriorSty
{
if (theEdgeLineWidth <= 0.0)
{
Aspect_AspectFillAreaDefinitionError::Raise ("Bad value for EdgeLineWidth");
throw Aspect_AspectFillAreaDefinitionError("Bad value for EdgeLineWidth");
}
}

View File

@@ -245,7 +245,7 @@ public:
{
if (theWidth <= 0.0)
{
Aspect_AspectFillAreaDefinitionError::Raise ("Bad value for EdgeLineWidth");
throw Aspect_AspectFillAreaDefinitionError("Bad value for EdgeLineWidth");
}
myEdgeWidth = (float )theWidth;
}

View File

@@ -42,6 +42,6 @@ Graphic3d_AspectLine3d::Graphic3d_AspectLine3d (const Quantity_Color& theColor
{
if (myWidth <= 0.0f)
{
Aspect_AspectLineDefinitionError::Raise ("Graphic3d_AspectLine3d, Bad value for LineWidth");
throw Aspect_AspectLineDefinitionError("Graphic3d_AspectLine3d, Bad value for LineWidth");
}
}

View File

@@ -76,7 +76,7 @@ public:
{
if (theWidth <= 0.0f)
{
Aspect_AspectLineDefinitionError::Raise ("Graphic3d_AspectLine3d, Bad value for LineWidth");
throw Aspect_AspectLineDefinitionError("Graphic3d_AspectLine3d, Bad value for LineWidth");
}
myWidth = theWidth;
}

View File

@@ -42,7 +42,7 @@ Graphic3d_AspectMarker3d::Graphic3d_AspectMarker3d (const Aspect_TypeOfMarker th
{
if (theScale <= 0.0)
{
Aspect_AspectMarkerDefinitionError::Raise ("Bad value for MarkerScale");
throw Aspect_AspectMarkerDefinitionError("Bad value for MarkerScale");
}
}

View File

@@ -73,7 +73,7 @@ public:
{
if (theScale <= 0.0f)
{
Aspect_AspectMarkerDefinitionError::Raise ("Bad value for MarkerScale");
throw Aspect_AspectMarkerDefinitionError("Bad value for MarkerScale");
}
myScale = theScale;
}

View File

@@ -64,6 +64,6 @@ Graphic3d_AspectText3d::Graphic3d_AspectText3d (const Quantity_Color& theColor,
if (theExpansionFactor <= 0.0)
{
Graphic3d_AspectTextDefinitionError::Raise ("Bad value for TextScaleFactor");
throw Graphic3d_AspectTextDefinitionError("Bad value for TextScaleFactor");
}
}

View File

@@ -84,7 +84,7 @@ public:
{
if (theFactor <= 0.0)
{
Graphic3d_AspectTextDefinitionError::Raise ("Bad value for TextScaleFactor");
throw Graphic3d_AspectTextDefinitionError("Bad value for TextScaleFactor");
}
myFactor = theFactor;
}

View File

@@ -27,7 +27,7 @@ DEFINE_STANDARD_HANDLE(Graphic3d_AspectTextDefinitionError, Standard_OutOfRange)
#if !defined No_Exception && !defined No_Graphic3d_AspectTextDefinitionError
#define Graphic3d_AspectTextDefinitionError_Raise_if(CONDITION, MESSAGE) \
if (CONDITION) Graphic3d_AspectTextDefinitionError::Raise(MESSAGE);
if (CONDITION) throw Graphic3d_AspectTextDefinitionError(MESSAGE);
#else
#define Graphic3d_AspectTextDefinitionError_Raise_if(CONDITION, MESSAGE)
#endif

View File

@@ -27,7 +27,7 @@ DEFINE_STANDARD_HANDLE(Graphic3d_GroupDefinitionError, Standard_OutOfRange)
#if !defined No_Exception && !defined No_Graphic3d_GroupDefinitionError
#define Graphic3d_GroupDefinitionError_Raise_if(CONDITION, MESSAGE) \
if (CONDITION) Graphic3d_GroupDefinitionError::Raise(MESSAGE);
if (CONDITION) throw Graphic3d_GroupDefinitionError(MESSAGE);
#else
#define Graphic3d_GroupDefinitionError_Raise_if(CONDITION, MESSAGE)
#endif

View File

@@ -559,7 +559,7 @@ void Graphic3d_MaterialAspect::SetAmbient (const Standard_ShortReal theValue)
if (theValue < 0.0f
|| theValue > 1.0f)
{
Graphic3d_MaterialDefinitionError::Raise ("Bad value for SetAmbient < 0. or > 1.0");
throw Graphic3d_MaterialDefinitionError("Bad value for SetAmbient < 0. or > 1.0");
}
myColorCoef[Graphic3d_TOR_AMBIENT] = theValue;
@@ -653,7 +653,7 @@ void Graphic3d_MaterialAspect::SetDiffuse (const Standard_ShortReal theValue)
if (theValue < 0.0f
|| theValue > 1.0f)
{
Graphic3d_MaterialDefinitionError::Raise ("Bad value for SetDiffuse < 0. or > 1.0");
throw Graphic3d_MaterialDefinitionError("Bad value for SetDiffuse < 0. or > 1.0");
}
myColorCoef[Graphic3d_TOR_DIFFUSE] = theValue;
@@ -673,7 +673,7 @@ void Graphic3d_MaterialAspect::SetEmissive (const Standard_ShortReal theValue)
if (theValue < 0.0f
|| theValue > 1.0f)
{
Graphic3d_MaterialDefinitionError::Raise ("Bad value for SetEmissive < 0. or > 1.0");
throw Graphic3d_MaterialDefinitionError("Bad value for SetEmissive < 0. or > 1.0");
}
myColorCoef[Graphic3d_TOR_EMISSION] = theValue;
@@ -707,7 +707,7 @@ void Graphic3d_MaterialAspect::SetSpecular (const Standard_ShortReal theValue)
if (theValue < 0.0f
|| theValue > 1.0f)
{
Graphic3d_MaterialDefinitionError::Raise ("Bad value for SetSpecular < 0. or > 1.0");
throw Graphic3d_MaterialDefinitionError("Bad value for SetSpecular < 0. or > 1.0");
}
myColorCoef[Graphic3d_TOR_SPECULAR] = theValue;
@@ -727,7 +727,7 @@ void Graphic3d_MaterialAspect::SetTransparency (const Standard_ShortReal theValu
if (theValue < 0.0f
|| theValue > 1.0f)
{
Graphic3d_MaterialDefinitionError::Raise ("Bad value for SetTransparency < 0. or > 1.0");
throw Graphic3d_MaterialDefinitionError("Bad value for SetTransparency < 0. or > 1.0");
}
myTransparencyCoef = theValue;
@@ -741,7 +741,7 @@ void Graphic3d_MaterialAspect::SetRefractionIndex (const Standard_ShortReal theV
{
if (theValue < 1.0f)
{
Graphic3d_MaterialDefinitionError::Raise ("Bad value for refraction index < 1.0");
throw Graphic3d_MaterialDefinitionError("Bad value for refraction index < 1.0");
}
myRefractionIndex = theValue;
@@ -756,7 +756,7 @@ void Graphic3d_MaterialAspect::SetShininess (const Standard_ShortReal theValue)
if (theValue < 0.0f
|| theValue > 1.0f)
{
Graphic3d_MaterialDefinitionError::Raise ("Bad value for Shininess < 0. or > 1.0");
throw Graphic3d_MaterialDefinitionError("Bad value for Shininess < 0. or > 1.0");
}
myShininess = theValue;
@@ -771,7 +771,7 @@ Standard_CString Graphic3d_MaterialAspect::MaterialName (const Standard_Integer
{
if (theRank < 1 || theRank > NumberOfMaterials())
{
Standard_OutOfRange::Raise ("BAD index of material");
throw Standard_OutOfRange("BAD index of material");
}
const RawMaterial& aMat = THE_MATERIALS[theRank - 1];
return aMat.StringName;
@@ -832,7 +832,7 @@ Graphic3d_TypeOfMaterial Graphic3d_MaterialAspect::MaterialType (const Standard_
{
if (theRank < 1 || theRank > NumberOfMaterials())
{
Standard_OutOfRange::Raise ("BAD index of material");
throw Standard_OutOfRange("BAD index of material");
}
const RawMaterial& aMat = THE_MATERIALS[theRank - 1];
return aMat.MaterialType;

View File

@@ -27,7 +27,7 @@ DEFINE_STANDARD_HANDLE(Graphic3d_MaterialDefinitionError, Standard_OutOfRange)
#if !defined No_Exception && !defined No_Graphic3d_MaterialDefinitionError
#define Graphic3d_MaterialDefinitionError_Raise_if(CONDITION, MESSAGE) \
if (CONDITION) Graphic3d_MaterialDefinitionError::Raise(MESSAGE);
if (CONDITION) throw Graphic3d_MaterialDefinitionError(MESSAGE);
#else
#define Graphic3d_MaterialDefinitionError_Raise_if(CONDITION, MESSAGE)
#endif

View File

@@ -27,7 +27,7 @@ DEFINE_STANDARD_HANDLE(Graphic3d_PriorityDefinitionError, Standard_OutOfRange)
#if !defined No_Exception && !defined No_Graphic3d_PriorityDefinitionError
#define Graphic3d_PriorityDefinitionError_Raise_if(CONDITION, MESSAGE) \
if (CONDITION) Graphic3d_PriorityDefinitionError::Raise(MESSAGE);
if (CONDITION) throw Graphic3d_PriorityDefinitionError(MESSAGE);
#else
#define Graphic3d_PriorityDefinitionError_Raise_if(CONDITION, MESSAGE)
#endif

View File

@@ -66,8 +66,7 @@ const TCollection_AsciiString& Graphic3d_ShaderProgram::ShadersFolder()
|| !aProgramFile.Exists())
{
std::cerr << "Standard GLSL programs are not found in: " << THE_SHADERS_FOLDER.ToCString() << std::endl;
Standard_Failure::Raise ("CSF_ShadersDirectory or CASROOT is set incorrectly");
return THE_SHADERS_FOLDER;
throw Standard_Failure("CSF_ShadersDirectory or CASROOT is set incorrectly");
}
}
return THE_SHADERS_FOLDER;

View File

@@ -27,7 +27,7 @@ DEFINE_STANDARD_HANDLE(Graphic3d_StructureDefinitionError, Standard_OutOfRange)
#if !defined No_Exception && !defined No_Graphic3d_StructureDefinitionError
#define Graphic3d_StructureDefinitionError_Raise_if(CONDITION, MESSAGE) \
if (CONDITION) Graphic3d_StructureDefinitionError::Raise(MESSAGE);
if (CONDITION) throw Graphic3d_StructureDefinitionError(MESSAGE);
#else
#define Graphic3d_StructureDefinitionError_Raise_if(CONDITION, MESSAGE)
#endif

View File

@@ -89,7 +89,7 @@ TCollection_AsciiString Graphic3d_Texture1D::TextureName (const Standard_Integer
{
if (theRank < 1 || theRank > NumberOfTextures())
{
Standard_OutOfRange::Raise ("BAD index of texture");
throw Standard_OutOfRange("BAD index of texture");
}
TCollection_AsciiString aFileName (NameOfTexture_to_FileName[theRank - 1]);

View File

@@ -108,7 +108,7 @@ TCollection_AsciiString Graphic3d_Texture2D::TextureName (const Standard_Integer
{
if (theRank < 1 || theRank > NumberOfTextures())
{
Standard_OutOfRange::Raise ("BAD index of texture");
throw Standard_OutOfRange("BAD index of texture");
}
TCollection_AsciiString aFileName (NameOfTexture_to_FileName[theRank - 1]);

View File

@@ -109,7 +109,7 @@ TCollection_AsciiString Graphic3d_TextureEnv::TextureName (const Standard_Intege
{
if(theRank < 1 || theRank > NumberOfTextures())
{
Standard_OutOfRange::Raise ("BAD index of texture");
throw Standard_OutOfRange("BAD index of texture");
}
TCollection_AsciiString aFileName (NameOfTexture_to_FileName[theRank - 1]);

View File

@@ -61,8 +61,7 @@ TCollection_AsciiString Graphic3d_TextureRoot::TexturesFolder()
std::cerr << "Both environment variables CSF_MDTVTexturesDirectory and CASROOT are undefined!\n"
<< "At least one should be defined to use standard Textures.\n";
#endif
Standard_Failure::Raise ("CSF_MDTVTexturesDirectory and CASROOT are undefined");
return VarName;
throw Standard_Failure("CSF_MDTVTexturesDirectory and CASROOT are undefined");
}
const OSD_Path aDirPath (VarName);
@@ -75,8 +74,7 @@ TCollection_AsciiString Graphic3d_TextureRoot::TexturesFolder()
std::cerr << " CSF_MDTVTexturesDirectory or CASROOT not correctly setted\n";
std::cerr << " not all files are found in : "<< VarName.ToCString() << std::endl;
#endif
Standard_Failure::Raise ("CSF_MDTVTexturesDirectory or CASROOT not correctly setted");
return VarName;
throw Standard_Failure("CSF_MDTVTexturesDirectory or CASROOT not correctly setted");
}
}
return VarName;

View File

@@ -27,7 +27,7 @@ DEFINE_STANDARD_HANDLE(Graphic3d_TransformError, Standard_OutOfRange)
#if !defined No_Exception && !defined No_Graphic3d_TransformError
#define Graphic3d_TransformError_Raise_if(CONDITION, MESSAGE) \
if (CONDITION) Graphic3d_TransformError::Raise(MESSAGE);
if (CONDITION) throw Graphic3d_TransformError(MESSAGE);
#else
#define Graphic3d_TransformError_Raise_if(CONDITION, MESSAGE)
#endif

View File

@@ -68,7 +68,7 @@ public:
}
else
{
Standard_ProgramError::Raise ("Graphic3d_TransformPers::SetPersistence(), wrong persistence mode.");
throw Standard_ProgramError("Graphic3d_TransformPers::SetPersistence(), wrong persistence mode.");
}
}
@@ -111,7 +111,7 @@ public:
{
if (!IsZoomOrRotate (theMode))
{
Standard_ProgramError::Raise ("Graphic3d_TransformPers::SetPersistence(), wrong persistence mode.");
throw Standard_ProgramError("Graphic3d_TransformPers::SetPersistence(), wrong persistence mode.");
}
myMode = theMode;
@@ -128,7 +128,7 @@ public:
{
if (!IsTrihedronOr2d (theMode))
{
Standard_ProgramError::Raise ("Graphic3d_TransformPers::SetPersistence(), wrong persistence mode.");
throw Standard_ProgramError("Graphic3d_TransformPers::SetPersistence(), wrong persistence mode.");
}
myMode = theMode;
@@ -144,7 +144,7 @@ public:
{
if (!IsZoomOrRotate())
{
Standard_ProgramError::Raise ("Graphic3d_TransformPers::AnchorPoint(), wrong persistence mode.");
throw Standard_ProgramError("Graphic3d_TransformPers::AnchorPoint(), wrong persistence mode.");
}
return gp_Pnt (myParams.Params3d.PntX, myParams.Params3d.PntY, myParams.Params3d.PntZ);
@@ -155,7 +155,7 @@ public:
{
if (!IsZoomOrRotate())
{
Standard_ProgramError::Raise ("Graphic3d_TransformPers::SetAnchorPoint(), wrong persistence mode.");
throw Standard_ProgramError("Graphic3d_TransformPers::SetAnchorPoint(), wrong persistence mode.");
}
myParams.Params3d.PntX = thePnt.X();
@@ -168,7 +168,7 @@ public:
{
if (!IsTrihedronOr2d())
{
Standard_ProgramError::Raise ("Graphic3d_TransformPers::Corner2d(), wrong persistence mode.");
throw Standard_ProgramError("Graphic3d_TransformPers::Corner2d(), wrong persistence mode.");
}
return myParams.Params2d.Corner;
@@ -179,7 +179,7 @@ public:
{
if (!IsTrihedronOr2d())
{
Standard_ProgramError::Raise ("Graphic3d_TransformPers::SetCorner2d(), wrong persistence mode.");
throw Standard_ProgramError("Graphic3d_TransformPers::SetCorner2d(), wrong persistence mode.");
}
myParams.Params2d.Corner = thePos;
@@ -190,7 +190,7 @@ public:
{
if (!IsTrihedronOr2d())
{
Standard_ProgramError::Raise ("Graphic3d_TransformPers::Offset2d(), wrong persistence mode.");
throw Standard_ProgramError("Graphic3d_TransformPers::Offset2d(), wrong persistence mode.");
}
return Graphic3d_Vec2i (myParams.Params2d.OffsetX, myParams.Params2d.OffsetY);
@@ -201,7 +201,7 @@ public:
{
if (!IsTrihedronOr2d())
{
Standard_ProgramError::Raise ("Graphic3d_TransformPers::SetOffset2d(), wrong persistence mode.");
throw Standard_ProgramError("Graphic3d_TransformPers::SetOffset2d(), wrong persistence mode.");
}
myParams.Params2d.OffsetX = theOffset.x();

View File

@@ -99,7 +99,7 @@ Standard_Real Graphic3d_Vector::Z () const {
void Graphic3d_Vector::Normalize () {
if (Abs (MyNorme) <= RealEpsilon ())
Graphic3d_VectorError::Raise ("The norm is null");
throw Graphic3d_VectorError("The norm is null");
if (!IsNormalized()) // CQO CTS40181
{

View File

@@ -27,7 +27,7 @@ DEFINE_STANDARD_HANDLE(Graphic3d_VectorError, Standard_OutOfRange)
#if !defined No_Exception && !defined No_Graphic3d_VectorError
#define Graphic3d_VectorError_Raise_if(CONDITION, MESSAGE) \
if (CONDITION) Graphic3d_VectorError::Raise(MESSAGE);
if (CONDITION) throw Graphic3d_VectorError(MESSAGE);
#else
#define Graphic3d_VectorError_Raise_if(CONDITION, MESSAGE)
#endif