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

#include "EnumeratedException.h"

Inheritance diagram for GraphicSpace::EnumeratedException:
Inheritance graph
Collaboration diagram for GraphicSpace::EnumeratedException:
Collaboration graph

Public Member Functions

 EnumeratedException (EnumeratedExceptionType thisExceptionKind) noexcept
 
 ~EnumeratedException (void) noexcept=default
 
void Write (FILE *OutputFile) const noexcept override
 

Private Attributes

EnumeratedExceptionType ExceptionKind
 

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 EnumeratedExceptionType type represents the exceptions thrown when an enumerated command line parameter is not correct.

Definition at line 59 of file EnumeratedException.h.

Constructor & Destructor Documentation

◆ EnumeratedException()

GraphicSpace::EnumeratedException::EnumeratedException ( EnumeratedExceptionType  thisExceptionKind)
noexcept
Description:
Constructor.
Parameters
thisExceptionKindKind of the exception.
Exceptions
None.
Returns
Not applicable

Definition at line 45 of file EnumeratedException.cpp.

◆ ~EnumeratedException()

GraphicSpace::EnumeratedException::~EnumeratedException ( void  )
defaultnoexcept

Member Function Documentation

◆ Write()

void GraphicSpace::EnumeratedException::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 EnumeratedException.cpp.

Member Data Documentation

◆ ErrorFormat

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

Format string used to write error messages with a number.

Definition at line 69 of file EnumeratedException.h.

◆ ExceptionKind

GraphicSpace::EnumeratedException::ExceptionKind
private

Kind of the exception.

Definition at line 65 of file EnumeratedException.h.

◆ Message

GraphicSpace::EnumeratedException::Message
staticprivate
Initial value:
=
{
"invalid Randomize",
"invalid PathChoice",
"invalid TruncatePath",
"invalid Quiet"
}

Array of error messages, one for each error.

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

Definition at line 79 of file EnumeratedException.h.


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