StormByte-Config 3.0.0
C++26 configuration-document module of the StormByte suite
Loading...
Searching...
No Matches
StormByte::Config::Exception Class Reference

Root exception for Config. More...

#include <StormByte/config/exception.hxx>

Inheritance diagram for StormByte::Config::Exception:
Collaboration diagram for StormByte::Config::Exception:

Classes

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

Public Member Functions

template<typename... Args>
requires (sizeof...(Args) >= 1)
 Exception (std::string_view pattern, Args &&... args)
 Replace literal {} under StormByte.Config.
 Exception (std::string_view message)
 Format a plain message under StormByte.Config.
 Exception (Path path, std::string_view message)
 Plain message under an additional Config 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 Config.

what() is StormByte.Config: message.

This type applies the Config 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/5]

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

Replace literal {} under StormByte.Config.

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

◆ Exception() [2/5]

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

Format a plain message under StormByte.Config.

Parameters
messageException text. Not a format string.

◆ Exception() [3/5]

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

Plain message under an additional Config path.

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

◆ Exception() [4/5]

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

Copy constructor.

Parameters
otherException to copy.

◆ Exception() [5/5]

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

Move constructor.

Parameters
otherException to move.

◆ ~Exception()

StormByte::Config::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::Config::Exception::operator= ( const Exception & other)
default

Copy assignment operator.

Parameters
otherException to copy.
Returns
Reference to this Exception.

◆ operator=() [2/2]

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

Move assignment operator.

Parameters
otherException to move.
Returns
Reference to this Exception.

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