ThinSQLite++
A thin, safe and convenient modern C++ wrapper for SQLite API.
Loading...
Searching...
No Matches
exception Class Reference

Exception used to report any SQLite errors. More...

Inheritance diagram for exception:
exception

Public Member Functions

 exception (class error &&err) noexcept
 Constructs an instance by moving an error in.
 
 exception (const class error &err) noexcept
 Constructs an instance by copying an error.
 
 exception (int error_code) noexcept
 Constructs an instance from database independent error code.
 
 exception (int error_code, const database *db) noexcept
 Constructs an instance from the last error reported from a database.
 
 exception (int error_code, const std::unique_ptr< database > &db) noexcept
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
 exception (int error_code, const database &db) noexcept
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
 exception (int error_code, error::message_ptr &&message) noexcept
 Constructs an instance with a given error code and message.
 
int extended_error_code () const noexcept
 Returns full extended error code of the stored error.
 
int primary_error_code () const noexcept
 Returns primary error code part of the stored error.
 
int system_error_code () const noexcept
 Returns system errno error code of the stored error, if available.
 
const class errorerror () const &noexcept
 Returns the stored error.
 
class errorerror () &noexcept
 Returns the stored error.
 
class error && error () &&noexcept
 Returns the stored error.
 
const char * what () const noexcept override
 Returns error message.
 
what (T... args)
 

Detailed Description

Exception used to report any SQLite errors.

The payload of this exception is an error object.

#include <thinsqlitepp/exception.hpp>

Constructor & Destructor Documentation

◆ exception() [1/3]

exception ( int error_code)
inlinenoexcept

Constructs an instance from database independent error code.

See error::error(int) for details

◆ exception() [2/3]

exception ( int error_code,
const database * db )
inlinenoexcept

Constructs an instance from the last error reported from a database.

See error::error(int, const database *) for details

◆ exception() [3/3]

exception ( int error_code,
error::message_ptr && message )
inlinenoexcept

Constructs an instance with a given error code and message.

See error::error(int, error::message_ptr &&) for details

Member Function Documentation

◆ what()

const char * what ( ) const
overridenoexcept

Returns error message.

If no error message is available in the stored error object returns a fixed string such as "<no message available>"