Root exception for Network.
More...
#include <StormByte/network/exception.hxx>
Root exception for Network.
what() is StormByte.Network: message.
This type applies the Network segment. A further segment is an Path (Connection, Transport.Packet, Transport.Frame). The body does not include the path. Literal {} are replaced by StormByte::Safe::String::ReplaceToken. This does not call std::format. The destructor is defined in this module.
The message constructor takes string_view. A literal, a C string, std::string and Safe::String reach it through their existing conversions. Safe::String converts implicitly.
- See also
- ConnectionError, ConnectionClosed, PacketError, FrameError
◆ Exception() [1/6]
template<typename... Args>
requires (sizeof...(Args) >= 1)
| StormByte::Network::Exception::Exception |
( |
std::string_view | pattern, |
|
|
Args &&... | args ) |
|
inlineexplicit |
Replace literal {} under StormByte.Network.
- Template Parameters
-
| Args | Views, numbers, or types that convert to std::string. A number uses std::to_string. |
- Parameters
-
| pattern | Body with literal {} tokens. Not a std::format string. |
| args | Replacements. One per token, in order. |
◆ Exception() [2/6]
| StormByte::Network::Exception::Exception |
( |
std::string_view | message | ) |
|
|
explicit |
Copy a borrowed plain message under StormByte.Network in the provider.
- Parameters
-
| message | Exception text. Copied during the call and never retained. |
◆ Exception() [3/6]
template<typename... Args>
requires (sizeof...(Args) >= 1)
| StormByte::Network::Exception::Exception |
( |
Path | path, |
|
|
std::string_view | pattern, |
|
|
Args &&... | args ) |
|
inlineexplicit |
Replace literal {} under an additional Network path.
- Template Parameters
-
| Args | Views, numbers, or types that convert to std::string. A number uses std::to_string. |
- Parameters
-
| path | Additional segments nested below StormByte.Network. |
| pattern | Body with literal {} tokens. Not a std::format string. |
| args | Replacements. One per token, in order. |
◆ Exception() [4/6]
| StormByte::Network::Exception::Exception |
( |
Path | path, |
|
|
std::string_view | message ) |
|
explicit |
Copy a borrowed plain message under an additional Network path.
- Parameters
-
◆ Exception() [5/6]
| StormByte::Network::Exception::Exception |
( |
const Exception & | other | ) |
|
Copy Base-owned message storage through its provider.
- Parameters
-
◆ Exception() [6/6]
| StormByte::Network::Exception::Exception |
( |
Exception && | other | ) |
|
|
noexcept |
Transfer Base-owned message storage without allocating.
- Parameters
-
◆ ~Exception()
| StormByte::Network::Exception::~Exception |
( |
| ) |
|
|
overridevirtualnoexcept |
Destroy the exception.
Defined in this module so catch matches across a DLL.
Reimplemented from StormByte::Exception.
◆ operator=() [1/2]
Copy Base-owned message storage through its provider.
- Parameters
-
- Returns
- This exception.
◆ operator=() [2/2]
Transfer Base-owned message storage without allocating.
- Parameters
-
- Returns
- This exception.
The documentation for this class was generated from the following file: