StormByte-Crypto 3.1.0
C++26 cryptography module of the StormByte suite
Loading...
Searching...
No Matches
StormByte::Crypto::Exception Class Reference

Root exception for Crypto. More...

#include <StormByte/crypto/exception.hxx>

Inheritance diagram for StormByte::Crypto::Exception:
Collaboration diagram for StormByte::Crypto::Exception:

Public Member Functions

Construction
template<typename... Args>
requires (sizeof...(Args) >= 1)
 Exception (std::string_view pattern, Args &&... args)
 Replace literal {} under StormByte.Crypto.
 Exception (std::string_view message)
 Plain message under StormByte.Crypto.
 Exception (const Exception &other)
 Copy constructor.
 Exception (Exception &&other) noexcept
 Move constructor.
 ~Exception () noexcept override
 Destructor.
Exception & operator= (const Exception &other)
 Copy assignment.
Exception & operator= (Exception &&other) noexcept
 Move assignment.
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

Protected Member Functions

template<typename... Args>
requires (sizeof...(Args) >= 1)
 Exception (StormByte::Exception::Path child, std::string_view pattern, Args &&... args)
 Replace literal {} under StormByte.Crypto plus the child segment.
 Exception (StormByte::Exception::Path child, std::string_view message)
 Plain message under StormByte.Crypto plus the child segment.
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 Crypto.

what() is StormByte.Crypto: message.

This type applies the Crypto segment. A further segment is a StormByte::Exception::Path (Hasher, Crypter). 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::Crypto::Exception::Exception ( std::string_view pattern,
Args &&... args )
inlineexplicit

Replace literal {} under StormByte.Crypto.

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::Crypto::Exception::Exception ( std::string_view message)
explicit

Plain message under StormByte.Crypto.

Parameters
messageException text. Not a format string.

◆ Exception() [3/6]

StormByte::Crypto::Exception::Exception ( const Exception & other)

Copy constructor.

Parameters
otherException to copy.

◆ Exception() [4/6]

StormByte::Crypto::Exception::Exception ( Exception && other)
noexcept

Move constructor.

Parameters
otherException to move.

◆ ~Exception()

StormByte::Crypto::Exception::~Exception ( )
overridevirtualnoexcept

◆ Exception() [5/6]

template<typename... Args>
requires (sizeof...(Args) >= 1)
StormByte::Crypto::Exception::Exception ( StormByte::Exception::Path child,
std::string_view pattern,
Args &&... args )
inlineexplicitprotected

Replace literal {} under StormByte.Crypto plus the child segment.

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

◆ Exception() [6/6]

StormByte::Crypto::Exception::Exception ( StormByte::Exception::Path child,
std::string_view message )
explicitprotected

Plain message under StormByte.Crypto plus the child segment.

Parameters
childSegment under Crypto. Not the full path.
messageException text. Not a format string.

Member Function Documentation

◆ operator=() [1/2]

Exception & StormByte::Crypto::Exception::operator= ( const Exception & other)

Copy assignment.

Parameters
otherException to copy.
Returns
Reference to this exception.

◆ operator=() [2/2]

Exception & StormByte::Crypto::Exception::operator= ( Exception && other)
noexcept

Move assignment.

Parameters
otherException to move.
Returns
Reference to this exception.

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