100 explicit constexpr Path(std::string_view text = {})
noexcept: text(text) {}
111 template <
typename... Args>
112 Exception(std::format_string<Args...> fmt, Args&&... args)
150 virtual const
char* what() const noexcept;
161 template <typename... Args>
163 const std::string body =
sizeof...(Args) == 0
164 ? std::string(fmt.get())
165 : std::format(fmt, std::forward<Args>(args)...);
166 if (path.text.empty())
167 Assign(
"StormByte", body);
169 const std::string full = std::string(
"StormByte.") + std::string(path.text);
180 void Assign(std::string_view path, std::string_view body) {
182 full.reserve(path.size() + 2 + body.size());
198 using Exception::Exception;
212 using Exception::Exception;
226 using Exception::Exception;
Thrown when Base64 encode or decode fails.
Definition exception.hxx:224
~Base64Error() noexcept override
Destructor.
Thrown when deserialization fails.
Definition exception.hxx:196
~DeserializeError() noexcept override
Destructor.
Base exception type for the suite.
Definition exception.hxx:72
Exception(Exception &&e) noexcept=default
Move constructor.
Exception(std::format_string< Args... > fmt, Args &&... args)
Constructs with std::format.
Definition exception.hxx:112
Exception(const Safe::String &message)
Copies owned text into StormByte: message.
Exception(const Exception &e)=default
Copy constructor.
Exception(std::string_view message)
Copies text into StormByte: message.
virtual ~Exception() noexcept
Destructor.
Thrown when an index or range is out of bounds.
Definition exception.hxx:210
~OutOfBoundsError() noexcept override
Destructor.
Owned UTF-8 text composed of StormByte::Safe::CString.
Definition string.hxx:97
Root namespace of the StormByte suite.
Segments under StormByte, already joined with a dot.
Definition exception.hxx:93
constexpr Path(std::string_view text={}) noexcept
Wraps text.
Definition exception.hxx:100
std::string_view text
Joined segments. Empty means the root.
Definition exception.hxx:94
#define STORMBYTE_PUBLIC
Definition visibility.h:52