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

#include "IntegerException.h"

Inheritance diagram for GraphicSpace::IntegerException:
Inheritance graph
Collaboration diagram for GraphicSpace::IntegerException:
Collaboration graph

Public Member Functions

 IntegerException (IntegerExceptionType thisExceptionKind, uint_fast32_t thisValue) noexcept
 
 ~IntegerException (void) noexcept=default
 
void Write (FILE *OutputFile) const noexcept override
 

Private Attributes

IntegerExceptionType ExceptionKind
 
uint_fast32_t 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 IntegerException class represents an exceptions thrown because an integer number is outside its valid range.

Definition at line 92 of file IntegerException.h.

Constructor & Destructor Documentation

◆ IntegerException()

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

Definition at line 57 of file IntegerException.cpp.

◆ ~IntegerException()

GraphicSpace::IntegerException::~IntegerException ( void  )
defaultnoexcept

Member Function Documentation

◆ Write()

void GraphicSpace::IntegerException::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 84 of file IntegerException.cpp.

Member Data Documentation

◆ ErrorFormat

GraphicSpace::IntegerException::ErrorFormat
staticprivate
Initial value:
=
"Input data error: %s %" PRIuFAST32 "\n"

Format string used to write error messages with a number.

Definition at line 106 of file IntegerException.h.

◆ ExceptionKind

GraphicSpace::IntegerException::ExceptionKind
private

Kind of the exception.

Definition at line 98 of file IntegerException.h.

◆ Message

GraphicSpace::IntegerException::Message
staticprivate
Initial value:
=
{
"invalid file size",
"invalid bitmap offset",
"invalid DIB header size",
"invalid image width",
"invalid image height",
"bitmap too large",
"invalid number of color planes",
"invalid number of bits per pixel",
"invalid value for compression",
"invalid image size",
"invalid number of colors",
"invalid number of important colors",
"invalid number of threads",
"invalid number of termites",
"invalid number of steps"
}

Array of error messages, one for each error.

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

Definition at line 116 of file IntegerException.h.

◆ Value

GraphicSpace::IntegerException::Value
private

Value that caused the exception.

Definition at line 102 of file IntegerException.h.


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