STE-Industries: utilities testing
GraphicSpace::FloatException Class Reference

#include "FloatException.h"

Inheritance diagram for GraphicSpace::FloatException:
Inheritance graph
Collaboration diagram for GraphicSpace::FloatException:
Collaboration graph

Public Member Functions

 FloatException (FloatExceptionType thisExceptionKind, float thisValue) noexcept
 
 ~FloatException (void) noexcept=default
 
void Write (FILE *OutputFile) const noexcept override
 

Private Attributes

FloatExceptionType ExceptionKind
 
float Value
 

Static Private Attributes

static const char *const ErrorFormat
 
static const char *const Message []
 

Additional Inherited Members

 Exception (void) noexcept
 
virtual ~Exception (void) noexcept=default
 
- Static Private Member Functions inherited from GraphicSpace::Exception
static void FatalError (void) noexcept
 

Detailed Description

The FloatException class represents an exceptions thrown because a floating point number is outside its valid range.

Definition at line 56 of file FloatException.h.

Constructor & Destructor Documentation

◆ FloatException()

GraphicSpace::FloatException::FloatException ( FloatExceptionType  thisExceptionKind,
float  thisValue 
)
noexcept
Description:
Constructor.
Parameters
thisExceptionKindKind of the exception.
thisValueValue that caused the exception.
Exceptions
None.
Returns
Not applicable

Definition at line 45 of file FloatException.cpp.

◆ ~FloatException()

GraphicSpace::FloatException::~FloatException ( void  )
defaultnoexcept

Member Function Documentation

◆ Write()

void GraphicSpace::FloatException::Write ( FILE *  OutputFile) const
overridevirtualnoexcept
Description:
Write an error message.
Parameters
OutputFilePointer to the file on which the message will be written.
Exceptions
None.
Returns
None.
Note
If OutputFile is not a valid file, opened for writing, the behavior is unpredictable.
If an error occurs while writing on OutputFile, the process is terminated.

Reimplemented from GraphicSpace::Exception.

Definition at line 72 of file FloatException.cpp.

Member Data Documentation

◆ ErrorFormat

GraphicSpace::FloatException::ErrorFormat
staticprivate
Initial value:
=
"Parameter error: %s %g\n"

Format string used to write error messages with a number.

Definition at line 70 of file FloatException.h.

◆ ExceptionKind

GraphicSpace::FloatException::ExceptionKind
private

Kind of the exception.

Definition at line 62 of file FloatException.h.

◆ Message

GraphicSpace::FloatException::Message
staticprivate
Initial value:
=
{
"invalid Q",
"invalid alpha",
"invalid beta"
}

Array of error messages, one for each error.

Note
The sequence of messages must correspond to the sequence of values of the FloatExceptionType type.
See also
FloatExceptionType

Definition at line 80 of file FloatException.h.

◆ Value

GraphicSpace::FloatException::Value
private

Value that caused the exception.

Definition at line 66 of file FloatException.h.


The documentation for this class was generated from the following files: