Base exception for Safe.
More...
#include <StormByte/safe/exception.hxx>
|
| | Exception () noexcept |
| | Construct without allocating message storage.
|
| | Exception () noexcept |
| | Construct without allocating message storage.
|
| | Exception (Path path, std::string_view message) |
| | Stores StormByte.path: message, or StormByte: message when path is empty.
|
| | Exception (Path path, Safe::String &&message) |
| | Stores StormByte.path: message, taking the body.
|
template<typename... Args>
requires (sizeof...(Args) >= 1) |
| | Exception (Path path, std::string_view pattern, Args &&... args) |
| | Stores StormByte.path: message after replacing literal {}.
|
Base exception for Safe.
Leaf text is StormByte.Safe: message.
The body does not include the path. This type applies the Safe segment. Copy, move and the destructor are defined in the Base DLL. A leaf that must not allocate uses the empty constructor and overrides what(). The message constructor takes a view. A String converts to that view and is copied. There is no move constructor.
◆ Exception() [1/5]
| StormByte::Safe::Exception::Exception |
( |
std::string_view | message | ) |
|
|
explicit |
Copy a body into StormByte.Safe: message.
- Parameters
-
| message | Body. Not a path and not a format string. |
◆ Exception() [2/5]
| StormByte::Safe::Exception::Exception |
( |
const Exception & | other | ) |
|
Copy constructor.
Defined in the Base DLL.
- Parameters
-
◆ Exception() [3/5]
| StormByte::Safe::Exception::Exception |
( |
Exception && | other | ) |
|
|
noexcept |
Move constructor.
Defined in the Base DLL.
- Parameters
-
◆ ~Exception()
| StormByte::Safe::Exception::~Exception |
( |
| ) |
|
|
overridevirtualnoexcept |
Destructor.
Defined in the Base DLL so catch matches across modules.
Reimplemented from StormByte::Exception.
◆ Exception() [4/5]
template<typename... Args>
requires (sizeof...(Args) >= 1)
| StormByte::Safe::Exception::Exception |
( |
std::string_view | pattern, |
|
|
Args &&... | args ) |
|
inline |
Replace literal {} under the Safe path.
- Template Parameters
-
| Args | Views, numbers, or types that convert to std::string. A number uses std::to_string. |
- Parameters
-
| pattern | Body with literal {} tokens. |
| args | Replacements. One per token, in order. |
◆ Exception() [5/5]
| StormByte::Safe::Exception::Exception |
( |
| ) |
|
|
protectednoexcept |
Construct without allocating message storage.
Used by a leaf that overrides what() with a static string.
◆ operator=() [1/2]
Copy assignment.
Defined in the Base DLL.
- Parameters
-
- Returns
- This exception.
◆ operator=() [2/2]
Move assignment.
Defined in the Base DLL.
- Parameters
-
- Returns
- This exception.
The documentation for this class was generated from the following file: