StormByte-Logger 3.0.0
C++26 logger module of the StormByte suite
Loading...
Searching...
No Matches
StormByte::Logger::Exception Class Reference

Root exception for Logger. More...

#include <StormByte/logger/exception.hxx>

Inheritance diagram for StormByte::Logger::Exception:
Collaboration diagram for StormByte::Logger::Exception:

Classes

struct  Path
 Additional path segments nested below StormByte.Logger. More...

Public Member Functions

template<typename... Args>
requires (sizeof...(Args) >= 1)
 Exception (std::string_view pattern, Args &&... args)
 Replace literal {} under StormByte.Logger.
 Exception (std::string_view message)
 Copy a plain message under StormByte.Logger.
 Exception (Path path, std::string_view message)
 Plain message under an additional Logger path.
template<typename... Args>
requires (sizeof...(Args) >= 1)
 Exception (Path path, std::string_view pattern, Args &&... args)
 Replace literal {} under an additional Logger path.
 Exception (const Exception &other)=default
 Copy constructor.
 Exception (Exception &&other) noexcept=default
 Move constructor.
 ~Exception () noexcept override
 Destructor.
Exception & operator= (const Exception &other)=default
 Copy assignment operator.
Exception & operator= (Exception &&other) noexcept=default
 Move assignment operator.
Public Member Functions inherited from StormByte::Exception
 Exception (std::string_view message)
 Exception (const Exception &other)
 Exception (Exception &&other) noexcept
Exception & operator= (const Exception &other)
Exception & operator= (Exception &&other) noexcept
virtual const char * what () const noexcept

Additional Inherited Members

Protected Member Functions inherited from StormByte::Exception
 Exception () noexcept
 Exception (Path path, std::string_view message)
 Exception (Path path, Safe::String &&message)
 Exception (Path path, std::string_view pattern, Args &&... args)

Detailed Description

Root exception for Logger.

what() is StormByte.Logger: message.

This type applies the Logger segment. A further segment is an Path. 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.

Constructor & Destructor Documentation

◆ Exception() [1/6]

template<typename... Args>
requires (sizeof...(Args) >= 1)
StormByte::Logger::Exception::Exception ( std::string_view pattern,
Args &&... args )
inline

Replace literal {} under StormByte.Logger.

Template Parameters
ArgsViews, numbers, or types that convert to std::string. A number uses std::to_string.
Parameters
patternBody with literal {} tokens. Not a std::format string.
argsReplacements. One per token, in order.

◆ Exception() [2/6]

StormByte::Logger::Exception::Exception ( std::string_view message)
explicit

Copy a plain message under StormByte.Logger.

Parameters
messageException text. Not a format string.

◆ Exception() [3/6]

StormByte::Logger::Exception::Exception ( Path path,
std::string_view message )

Plain message under an additional Logger path.

Parameters
pathAdditional segments nested below StormByte.Logger.
messageException text. Not a format string.

◆ Exception() [4/6]

template<typename... Args>
requires (sizeof...(Args) >= 1)
StormByte::Logger::Exception::Exception ( Path path,
std::string_view pattern,
Args &&... args )
inline

Replace literal {} under an additional Logger path.

Template Parameters
ArgsViews, numbers, or types that convert to std::string. A number uses std::to_string.
Parameters
pathAdditional segments nested below StormByte.Logger.
patternBody with literal {} tokens. Not a std::format string.
argsReplacements. One per token, in order.

◆ Exception() [5/6]

StormByte::Logger::Exception::Exception ( const Exception & other)
default

Copy constructor.

Parameters
otherException to copy.

◆ Exception() [6/6]

StormByte::Logger::Exception::Exception ( Exception && other)
defaultnoexcept

Move constructor.

Parameters
otherException to move.

◆ ~Exception()

StormByte::Logger::Exception::~Exception ( )
overridevirtualnoexcept

Destructor.

Defined in this module so catch matches across a DLL.

Reimplemented from StormByte::Exception.

Member Function Documentation

◆ operator=() [1/2]

Exception & StormByte::Logger::Exception::operator= ( const Exception & other)
default

Copy assignment operator.

Parameters
otherException to copy.
Returns
This exception.

◆ operator=() [2/2]

Exception & StormByte::Logger::Exception::operator= ( Exception && other)
defaultnoexcept

Move assignment operator.

Parameters
otherException to move.
Returns
This exception.

The documentation for this class was generated from the following file: