Base exception type for the suite. More...
#include <StormByte/exception.hxx>

Classes | |
| struct | Path |
Segments under StormByte, already joined with a dot. More... | |
Public Member Functions | |
| Exception (const std::string &message) | |
| Constructs from a string. | |
| Exception (std::string &&message) | |
| Constructs from a moved string. | |
| template<typename... Args> | |
| Exception (std::format_string< Args... > fmt, Args &&... args) | |
Constructs with std::format. | |
| Exception (const Exception &e)=default | |
| Copy constructor. | |
| Exception (Exception &&e) noexcept=default | |
| Move constructor. | |
| virtual | ~Exception () noexcept |
| Destructor. | |
| Exception & | operator= (const Exception &e)=default |
| Copy assignment. | |
| Exception & | operator= (Exception &&e) noexcept=default |
| Move assignment. | |
| virtual const char * | what () const noexcept |
| Message pointer. | |
Protected Member Functions | |
| template<typename... Args> | |
| Exception (Path path, std::format_string< Args... > fmt, Args &&... args) | |
Stores StormByte.path: message, or StormByte: message when path is empty. | |
Base exception type for the suite.
what() is StormByte: message, or StormByte.path: message when a module parent passes the segments under StormByte (Crypto.Crypter). Segments are joined with a dot. The message is a StormByte::CString. std::format runs in the caller's translation unit. This DLL only copies a const char*. A parent passes StormByte::Exception::Path, a std::string_view that lives for the constructor call and is not stored. A bare string is not a path: that would be ambiguous with the format constructor.
A parent prepends its own segment and forwards the format and the arguments. It does not format. A final leaf adds no segment: it inherits the parent constructors. The destructor of each named type is defined in that module's .cxx, so the typeinfo is unique across a DLL.
|
explicit |
|
explicit |
|
inline |
Constructs with std::format.
Text is StormByte: formatted.
| Args | Format argument types. |
| fmt | Format string. |
| args | Format arguments. |
|
default |
Copy constructor.
| e | Exception to copy. |
|
defaultnoexcept |
Move constructor.
| e | Exception to take. |
|
virtualnoexcept |
Destructor.
Defined in the Base DLL: this anchors the typeinfo.
|
inlineprotected |
|
virtualnoexcept |
Message pointer.