StormByte-Database 3.0.0
C++26 database module of the StormByte suite
Loading...
Searching...
No Matches
StormByte::Database::QueryException Class Reference

Base for query errors. More...

#include <StormByte/database/exception.hxx>

Inheritance diagram for StormByte::Database::QueryException:
Collaboration diagram for StormByte::Database::QueryException:

Public Member Functions

 QueryException (std::string_view error)
 Construct from an error message.
template<typename... Args>
requires (sizeof...(Args) >= 1)
 QueryException (std::string_view component, std::string_view pattern, Args &&... args)
 Replace literal {} under StormByte.Database.Query.
 QueryException (const QueryException &other)=default
 Copy constructor.
 QueryException (QueryException &&other) noexcept=default
 Move constructor.
 ~QueryException () noexcept override
 Destructor.
QueryException & operator= (const QueryException &other)=default
 Copy assignment operator.
QueryException & operator= (QueryException &&other) noexcept=default
 Move assignment operator.
Public Member Functions inherited from StormByte::Database::Exception
template<typename... Args>
requires (sizeof...(Args) >= 1)
 Exception (std::string_view pattern, Args &&... args)
 Replace literal {} under StormByte.Database.
 Exception (std::string_view message)
 Copy a plain message under StormByte.Database.
 Exception (Path path, std::string_view message)
 Plain message under an additional Database path.
template<typename... Args>
requires (sizeof...(Args) >= 1)
 Exception (Path path, std::string_view pattern, Args &&... args)
 Replace literal {} under an additional Database 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)
Static Protected Member Functions inherited from StormByte::Database::Exception
static StormByte::Safe::String Segment (std::string_view prefix, std::string_view component)
 Join a fixed prefix and a dynamic segment.

Detailed Description

Base for query errors.

what() is StormByte.Database.Query: message.

Constructor & Destructor Documentation

◆ QueryException() [1/4]

StormByte::Database::QueryException::QueryException ( std::string_view error)
explicit

Construct from an error message.

Parameters
errorError text. Not a format string.

◆ QueryException() [2/4]

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

Replace literal {} under StormByte.Database.Query.

<component>.

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

◆ QueryException() [3/4]

StormByte::Database::QueryException::QueryException ( const QueryException & other)
default

Copy constructor.

Parameters
otherException to copy.

◆ QueryException() [4/4]

StormByte::Database::QueryException::QueryException ( QueryException && other)
defaultnoexcept

Move constructor.

Parameters
otherException to move.

◆ ~QueryException()

StormByte::Database::QueryException::~QueryException ( )
overridenoexcept

Destructor.

Defined in this module so catch matches across a DLL.

Member Function Documentation

◆ operator=() [1/2]

QueryException & StormByte::Database::QueryException::operator= ( const QueryException & other)
default

Copy assignment operator.

Parameters
otherException to copy.
Returns
This exception.

◆ operator=() [2/2]

QueryException & StormByte::Database::QueryException::operator= ( QueryException && other)
defaultnoexcept

Move assignment operator.

Parameters
otherException to move.
Returns
This exception.

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