ORM C++
Loading...
Searching...
No Matches
orm::DatabaseError Class Referencefinalexport
module orm

A backend-neutral database runtime error. More...

Inheritance diagram for orm::DatabaseError:
Collaboration diagram for orm::DatabaseError:

Public Member Functions

 DatabaseError (DatabaseErrorCode codeInit, db::BackendType backendTypeInit, std::string operationInit, std::string message, std::optional< std::string > nativeCodeInit=std::nullopt)
auto getCode () const noexcept -> DatabaseErrorCode
auto getBackendType () const noexcept -> db::BackendType
auto getOperation () const noexcept -> const std::string &
auto getNativeCode () const noexcept -> const std::optional< std::string > &

Detailed Description

A backend-neutral database runtime error.

The structured context intentionally excludes connection strings and bound parameter values. Backend adapters are responsible for passing a sanitized message to the constructor.

Definition at line 120 of file types.cppm.

Constructor & Destructor Documentation

◆ DatabaseError()

orm::DatabaseError::DatabaseError ( DatabaseErrorCode codeInit,
db::BackendType backendTypeInit,
std::string operationInit,
std::string message,
std::optional< std::string > nativeCodeInit = std::nullopt )
inline

Definition at line 123 of file types.cppm.

Member Function Documentation

◆ getBackendType()

auto orm::DatabaseError::getBackendType ( ) const -> db::BackendType
inlinenodiscardnoexcept

Definition at line 138 of file types.cppm.

◆ getCode()

auto orm::DatabaseError::getCode ( ) const -> DatabaseErrorCode
inlinenodiscardnoexcept

Definition at line 133 of file types.cppm.

◆ getNativeCode()

auto orm::DatabaseError::getNativeCode ( ) const -> const std::optional< std::string > &
inlinenodiscardnoexcept

Definition at line 148 of file types.cppm.

◆ getOperation()

auto orm::DatabaseError::getOperation ( ) const -> const std::string &
inlinenodiscardnoexcept

Definition at line 143 of file types.cppm.


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