23#include <StormByte/exception.hxx>
66 template <
typename... Args>
67 Exception(StormByte::Component component, std::format_string<Args...> fmt, Args&&... args):
76 template <
typename... Args>
77 Exception(std::format_string<Args...> fmt, Args&&... args):
92 using Exception::Exception;
108 Error(
StormByte::Component{
"Buffer::ReadError"},
"{}", message) {}
115 Error(
StormByte::Component{
"Buffer::ReadError"},
"{}", std::move(message)) {}
123 template <
typename... Args>
124 ReadError(std::format_string<Args...> fmt, Args&&... args):
125 Error(
StormByte::Component{
"Buffer::ReadError"}, fmt, std::forward<Args>(args)...) {}
141 Error(
StormByte::Component{
"Buffer::WriteError"},
"{}", message) {}
148 Error(
StormByte::Component{
"Buffer::WriteError"},
"{}", std::move(message)) {}
156 template <
typename... Args>
158 Error(
StormByte::Component{
"Buffer::WriteError"}, fmt, std::forward<Args>(args)...) {}
General exception class for buffer errors.
Definition exception.hxx:90
Base exception type for the Buffer module.
Definition exception.hxx:43
Exception(StormByte::Component component, std::format_string< Args... > fmt, Args &&... args)
Construct a Buffer exception with an explicit component.
Definition exception.hxx:67
Exception(const std::string &message)
Construct a Buffer exception from an unformatted message.
Definition exception.hxx:49
Exception(std::format_string< Args... > fmt, Args &&... args)
Construct a Buffer exception with a formatted message.
Definition exception.hxx:77
Exception(std::string &&message)
Construct a Buffer exception from a moved unformatted message.
Definition exception.hxx:56
Exception thrown when a buffer read / extract / peek operation fails.
Definition exception.hxx:101
ReadError(std::string &&message)
Construct a read error from a moved unformatted message.
Definition exception.hxx:114
ReadError(const std::string &message)
Construct a read error from an unformatted message.
Definition exception.hxx:107
ReadError(std::format_string< Args... > fmt, Args &&... args)
Construct a read error with a format message.
Definition exception.hxx:124
Exception thrown when a buffer write operation fails.
Definition exception.hxx:134
WriteError(const std::string &message)
Construct a write error from an unformatted message.
Definition exception.hxx:140
WriteError(std::format_string< Args... > fmt, Args &&... args)
Construct a write error with a format message.
Definition exception.hxx:157
WriteError(std::string &&message)
Construct a write error from a moved unformatted message.
Definition exception.hxx:147
Buffer module of the StormByte suite.
#define STORMBYTE_BUFFER_PUBLIC
Definition visibility.h:28