|
StormByte C++ Library 0.0.9999
StormByte is a comprehensive, cross-platform C++ library aimed at easing system programming, configuration management, logging, and database handling tasks. This library provides a unified API that abstracts away the complexities and inconsistencies of different platforms (Windows, Linux).
|
Base class for exceptions in the StormByte library. More...
#include <exception.hxx>

Public Member Functions | |
| Exception (const std::string &message) | |
| Constructor. | |
| Exception (std::string &&message) | |
| Constructor. | |
| template<typename... Args> | |
| Exception (std::format_string< Args... > fmt, Args &&... args) | |
Constructor forwards the message to the std::format function. | |
| Exception (const Exception &e) | |
| Copy constructor. | |
| Exception (Exception &&e) noexcept | |
| Move constructor. | |
| virtual | ~Exception () noexcept |
| Destructor. | |
| Exception & | operator= (const Exception &e) |
| Copy assignment operator. | |
| Exception & | operator= (Exception &&e) noexcept |
| Move assignment operator. | |
| virtual const char * | what () const noexcept |
| Gets the exception message. | |
Base class for exceptions in the StormByte library.
The Exception class provides a consistent mechanism for handling errors across library boundaries. It ensures compatibility with both Windows and Linux platforms and avoids issues with std::string across DLL boundaries by using const char* for internal storage.
|
explicit |
Constructor.
| message | Exception message as a std::string |
|
explicit |
Constructor.
| message | Exception message as a moved std::string |
|
inline |
Constructor forwards the message to the std::format function.
| Args | Format argument types |
| fmt | Format string |
| args | Arguments for formatting |
If no arguments are provided, the format string is used as the exception message directly.
Copy constructor.
| e | Exception to copy |
|
noexcept |
Move constructor.
| e | Exception to move |
Gets the exception message.
const char*