if ( R1 < 0. || R1 > 1. ||
R2 < 0. || R2 > 1. ||
R3 < 0. || R3 > 1. )
- Standard_OutOfRange::Raise ("Color out");
+ throw Standard_OutOfRange("Color out");
MyRed = Standard_ShortReal (R1);
MyGreen = Standard_ShortReal (R2);
MyBlue = Standard_ShortReal (R3);
|| (R1 > 360.) ||
R2 < 0. || R2 > 1. ||
R3 < 0. || R3 > 1. )
- Standard_OutOfRange::Raise ("Color out");
+ throw Standard_OutOfRange("Color out");
Quantity_Color::hlsrgb
(Standard_ShortReal (R1),
Standard_ShortReal (R2),
|| theRgb.g() < 0.0f || theRgb.g() > 1.0f
|| theRgb.b() < 0.0f || theRgb.b() > 1.0f)
{
- Standard_OutOfRange::Raise ("Color out");
+ throw Standard_OutOfRange("Color out");
}
}
if ( R1 < 0. || R1 > 1. ||
R2 < 0. || R2 > 1. ||
R3 < 0. || R3 > 1. )
- Standard_OutOfRange::Raise ("Color out");
+ throw Standard_OutOfRange("Color out");
else {
MyRed = Standard_ShortReal (R1);
MyGreen = Standard_ShortReal (R2);
if ( R1 < 0. || R1 > 360. ||
R2 < 0. || R2 > 1. ||
R3 < 0. || R3 > 1. )
- Standard_OutOfRange::Raise ("Color out");
+ throw Standard_OutOfRange("Color out");
else {
Quantity_Color::hlsrgb
(Standard_ShortReal (R1),
if ( R < 0. || R > 1. ||
G < 0. || G > 1. ||
B < 0. || B > 1. )
- Standard_OutOfRange::Raise ("Color out");
+ throw Standard_OutOfRange("Color out");
Quantity_Color AColor (R, G, B, Quantity_TOC_RGB); // Couleur definie en RGB.
RR = R1 = (float ) 0.603922; RG = R2 = (float ) 0.803922; RB = R3 = (float ) 0.196078;
break;
default :
- Standard_OutOfRange::Raise ("Bad name");
+ throw Standard_OutOfRange("Bad name");
break;
}
if (AType == Quantity_TOC_HLS)
break;
default :
TheName = "UNDEFINED";
- Standard_OutOfRange::Raise ("Bad name");
+ throw Standard_OutOfRange("Bad name");
break;
}
return (TheName);
TestOfColor ();
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) E = Standard_Failure::Caught();
- cout << E << endl;
+ catch (Standard_Failure const& anException) {
+ cout << anException << endl;
}
}