43#include <StormByte/exception.hxx>
45#include <StormByte/safe/string.hxx>
88 explicit constexpr Path(std::string_view
segments = {})
noexcept: segments(segments) {}
97 template <
typename... Args>
98 requires (
sizeof...(Args) >= 1)
99 explicit Exception(std::string_view pattern, Args&&... args)
115 template <
typename... Args>
116 requires (
sizeof...(Args) >= 1)
171 template <
typename... Args>
172 requires (
sizeof...(Args) >= 1)
174 :
Exception(
Path{
"Connection"}, pattern, std::forward<Args>(args)...) {}
190 template <
typename... Args>
191 requires (
sizeof...(Args) >= 1)
193 :
Exception(path, pattern,
std::forward<Args>(args)...) {}
250 template <
typename... Args>
251 requires (
sizeof...(Args) >= 1)
254 static_cast<
std::string_view>(
StormByte::
Safe::String::ReplaceToken(pattern,
std::forward<Args>(args)...))) {}
261 :
Exception(
Path{
"Connection"},
"Connection closed: {}", message) {}
270 template <
typename... Args>
271 requires (
sizeof...(Args) >= 1)
273 :
Exception(path, pattern,
std::forward<Args>(args)...) {}
327 template <
typename... Args>
328 requires (
sizeof...(Args) >= 1)
330 :
Exception(
Path{
"Transport.Packet"}, pattern,
std::forward<Args>(args)...) {}
346 template <
typename... Args>
347 requires (
sizeof...(Args) >= 1)
349 :
Exception(path, pattern,
std::forward<Args>(args)...) {}
403 template <
typename... Args>
404 requires (
sizeof...(Args) >= 1)
405 explicit FrameError(std::string_view pattern, Args&&... args)
406 :
Exception(
Path{
"Transport.Frame"}, pattern,
std::forward<Args>(args)...) {}
422 template <
typename... Args>
423 requires (
sizeof...(Args) >= 1)
425 :
Exception(path, pattern,
std::forward<Args>(args)...) {}
STORMBYTE_DECLARE_MAYBE_SAFE(StormByte::Buffer::Bridge)
~ConnectionClosed() noexcept override
Destructor.
ConnectionClosed(Path path, std::string_view pattern, Args &&... args)
Replace literal {} under an additional Network path.
Definition exception.hxx:272
ConnectionClosed(ConnectionClosed &&other) noexcept
Move the closed-connection error inside Network.
ConnectionClosed(Path path, std::string_view message)
Copy a borrowed plain message under an additional Network path.
Definition exception.hxx:280
ConnectionClosed(const ConnectionClosed &other)
Copy the closed-connection error inside Network.
ConnectionClosed(std::string_view message)
Prefix a borrowed message with Connection closed: .
Definition exception.hxx:260
ConnectionClosed(std::string_view pattern, Args &&... args)
Replace literal {}, then prefix Connection closed: .
Definition exception.hxx:252
~ConnectionError() noexcept override
Destructor.
ConnectionError(std::string_view pattern, Args &&... args)
Replace literal {} under StormByte.Network.Connection.
Definition exception.hxx:173
ConnectionError(Path path, std::string_view pattern, Args &&... args)
Replace literal {} under an additional Network path.
Definition exception.hxx:192
ConnectionError(Path path, std::string_view message)
Copy a borrowed plain message under an additional Network path.
Definition exception.hxx:200
ConnectionError(const ConnectionError &other)
Copy the connection error inside Network.
ConnectionError(ConnectionError &&other) noexcept
Move the connection error inside Network.
ConnectionError(std::string_view message)
Copy a borrowed plain message under StormByte.Network.Connection.
Definition exception.hxx:180
Exception & operator=(const Exception &other)
Copy Base-owned message storage through its provider.
Exception(Path path, std::string_view pattern, Args &&... args)
Replace literal {} under an additional Network path.
Definition exception.hxx:117
Exception(Path path, std::string_view message)
Copy a borrowed plain message under an additional Network path.
~Exception() noexcept override
Destroy the exception.
Exception(Exception &&other) noexcept
Transfer Base-owned message storage without allocating.
Exception & operator=(Exception &&other) noexcept
Transfer Base-owned message storage without allocating.
Exception(std::string_view pattern, Args &&... args)
Replace literal {} under StormByte.Network.
Definition exception.hxx:99
Exception(const Exception &other)
Copy Base-owned message storage through its provider.
Exception(std::string_view message)
Copy a borrowed plain message under StormByte.Network in the provider.
FrameError(const FrameError &other)
Copy the frame error inside Network.
FrameError(Path path, std::string_view pattern, Args &&... args)
Replace literal {} under an additional Network path.
Definition exception.hxx:424
FrameError(std::string_view message)
Copy a borrowed plain message under StormByte.Network.Transport.Frame.
Definition exception.hxx:412
~FrameError() noexcept override
Destructor.
FrameError(Path path, std::string_view message)
Copy a borrowed plain message under an additional Network path.
Definition exception.hxx:432
FrameError(FrameError &&other) noexcept
Move the frame error inside Network.
FrameError(std::string_view pattern, Args &&... args)
Replace literal {} under StormByte.Network.Transport.Frame.
Definition exception.hxx:405
PacketError(std::string_view message)
Copy a borrowed plain message under StormByte.Network.Transport.Packet.
Definition exception.hxx:336
PacketError(PacketError &&other) noexcept
Move the packet error inside Network.
~PacketError() noexcept override
Destructor.
PacketError(std::string_view pattern, Args &&... args)
Replace literal {} under StormByte.Network.Transport.Packet.
Definition exception.hxx:329
PacketError(Path path, std::string_view message)
Copy a borrowed plain message under an additional Network path.
Definition exception.hxx:356
PacketError(Path path, std::string_view pattern, Args &&... args)
Replace literal {} under an additional Network path.
Definition exception.hxx:348
PacketError(const PacketError &other)
Copy the packet error inside Network.
static String ReplaceToken(std::string_view text, Args &&... args)
Network module of the StormByte suite.
Root namespace of the StormByte suite.
Additional path segments nested below StormByte.Network.
Definition exception.hxx:81
std::string_view segments
Additional dotted path segments.
Definition exception.hxx:82
constexpr Path(std::string_view segments={}) noexcept
Wraps additional path segments.
Definition exception.hxx:88
#define STORMBYTE_NETWORK_PUBLIC
Definition visibility.h:51