ObjectBox C and C++ API  4.0.3
obx::DbException Class Reference

Database related exception, containing a error code to differentiate between various errors. Note: what() typically contains a specific text about the error condition (sometimes helpful to resolve the issue). More...

#include <objectbox.hpp>

Inheritance diagram for obx::DbException:
Inheritance graph

Public Member Functions

 DbException (const std::string &text, int code=0)
 
 DbException (const char *text, int code=0)
 
int code () const override
 The error code as defined in objectbox.h via the OBX_ERROR_* constants. More...
 

Detailed Description

Database related exception, containing a error code to differentiate between various errors. Note: what() typically contains a specific text about the error condition (sometimes helpful to resolve the issue).

Constructor & Destructor Documentation

◆ DbException() [1/2]

obx::DbException::DbException ( const std::string &  text,
int  code = 0 
)
inlineexplicit

◆ DbException() [2/2]

obx::DbException::DbException ( const char *  text,
int  code = 0 
)
inlineexplicit

Member Function Documentation

◆ code()

int obx::DbException::code ( ) const
inlineoverridevirtual

The error code as defined in objectbox.h via the OBX_ERROR_* constants.

Implements obx::Exception.