Base exception type for the suite.
More...
#include <StormByte/exception.hxx>
Base exception type for the suite.
Stores the message as const char* so a std::string does not cross a DLL boundary on Windows.
◆ Exception() [1/6]
| StormByte::Exception::Exception |
( |
const std::string & |
message | ) |
|
|
explicit |
Constructs from a string.
- Parameters
-
◆ Exception() [2/6]
| StormByte::Exception::Exception |
( |
std::string && |
message | ) |
|
|
explicit |
Constructs from a moved string.
- Parameters
-
◆ Exception() [3/6]
template<typename... Args>
| StormByte::Exception::Exception |
( |
std::format_string< Args... > |
fmt, |
|
|
Args &&... |
args |
|
) |
| |
|
inline |
Constructs with std::format.
- Template Parameters
-
| Args | Format argument types. |
- Parameters
-
| fmt | Format string. |
| args | Format arguments. |
- Note
- With zero arguments the format string is the message as-is.
◆ Exception() [4/6]
template<typename... Args>
| StormByte::Exception::Exception |
( |
Component |
component, |
|
|
std::format_string< Args... > |
fmt, |
|
|
Args &&... |
args |
|
) |
| |
|
inline |
Constructs with a component prefix and std::format.
- Template Parameters
-
| Args | Format argument types. |
- Parameters
-
| component | Module name, wrapped so it cannot be mistaken for fmt. |
| fmt | Format string. |
| args | Format arguments. |
- Note
- Final text is
StormByte::<component>: <formatted>.
◆ Exception() [5/6]
| StormByte::Exception::Exception |
( |
const Exception & |
e | ) |
|
Copy constructor.
- Parameters
-
◆ Exception() [6/6]
| StormByte::Exception::Exception |
( |
Exception && |
e | ) |
|
|
noexcept |
Move constructor.
- Parameters
-
◆ ~Exception()
| virtual StormByte::Exception::~Exception |
( |
| ) |
|
|
virtualnoexcept |
◆ operator=() [1/2]
Copy assignment.
- Parameters
-
- Returns
- Reference to this exception.
◆ operator=() [2/2]
Move assignment.
- Parameters
-
- Returns
- Reference to this exception.
◆ what()
| virtual const char * StormByte::Exception::what |
( |
| ) |
const |
|
virtualnoexcept |
Message pointer.
- Returns
- NUL-terminated message; owned by this object.
The documentation for this class was generated from the following file: