|
date
a C++20 date library
|
Exception thrown by the Date class. More...
#include <date.h>
Public Types | |
| enum class | Reason { INVALID_DAY , INVALID_MONTH , INVALID_YEAR , INVALID_DATE , INVALID_FORMAT , OUT_OF_RANGE , EPOCH_FAILURE , LOGIC_ERROR , SYSTEM_FAILURE } |
| Indicates the reason for a DateError exception. More... | |
Public Member Functions | |
| DateError (Reason reason, std::string message) | |
| Constructs a DateError from a reason and an error message. | |
| const char * | what () const noexcept override |
| Returns the exception message. | |
| Reason | GetReason () const noexcept |
| Returns the exception reason. | |
Exception thrown by the Date class.
|
strong |
Indicates the reason for a DateError exception.
| cgr::Date::DateError::DateError | ( | Reason | reason, |
| std::string | message ) |
Constructs a DateError from a reason and an error message.
| reason | The exception reason. |
| message | The error message. |
|
nodiscardoverridenoexcept |
Returns the exception message.
|
nodiscardnoexcept |
Returns the exception reason.