NDEVR
API Documentation
TimeFormatException

Thrown when a provided time format cannot be parsed from a given time string. More...

Inheritance diagram for TimeFormatException:
[legend]
Collaboration diagram for TimeFormatException:
[legend]

Public Member Functions

 TimeFormatException (const StringView &time_string, const StringView &format_string, TranslatedString message)
 Constructor initializing with a custom translated error message.
 TimeFormatException (const StringView &time_string, const StringView &format_string, uint04 position)
 Constructor initializing the exception with a time string, format, and failure position.
void makeMessage ()
 Constructs a human-readable error message from the stored time string, format, and position.

Public Attributes

String format_string
 The expected format string that the time string should have matched.
uint04 position
 The character position in the time string where parsing failed.
String time_string
 The original time string that failed to parse.

Detailed Description

Thrown when a provided time format cannot be parsed from a given time string.


Definition at line 9 of file TimeException.h.

Constructor & Destructor Documentation

◆ TimeFormatException() [1/2]

TimeFormatException::TimeFormatException ( const StringView & time_string,
const StringView & format_string,
uint04 position )
inline

Constructor initializing the exception with a time string, format, and failure position.

Parameters
[in]time_stringThe string that time extraction was attempted on.
[in]format_stringThe format that time_string should have adhered to.
[in]positionThe character position where parsing failed.

Definition at line 18 of file TimeException.h.

References format_string, position, and time_string.

◆ TimeFormatException() [2/2]

TimeFormatException::TimeFormatException ( const StringView & time_string,
const StringView & format_string,
TranslatedString message )
inline

Constructor initializing with a custom translated error message.

Parameters
[in]time_stringThe string that time extraction was attempted on.
[in]format_stringThe format that time_string should have adhered to.
[in]messageA custom translated message describing the error.

Definition at line 30 of file TimeException.h.

References format_string, position, and time_string.


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