OpenDBX::Exception(3)
π NAME π
Okay bestie, welcome to OpenDBX::Exception(3) from the opendbx manual. OpenDBX::Exception β Exceptions thrown by the OpenDBX classes. π
π SYNOPSIS π
π Public Member Functions π
Exception (const string &msg, int err, int type) throw ()
int getCode () const throw ()
int getType () const throw ()
Exceptionβ Initializes the exception object.getCodeβ Returns theOpenDBXerror code related to the error.getTypeβ Returns severity indicator.
πΈ Detailed Description πΈ
Okay so OpenDBX::Exception is literally the exception type thrown by the OpenDBX classes. Most calls to methods on OpenDBX objects throw an exception when an error happens in the underlying database library. The way that it's giving is: on top of being like other exceptions that inherit from the STL exception class, it doesn't just contain a translated error message depending on the user settings β it also carries a machine-readable error code and an indicator for the severity of the error. Highkey useful, ngl. β¨
π Author π
Norbert Sendetzky norbert@linuxnetworks.de
π Version π
1.0
π οΈ Constructor & Destructor Documentation π οΈ
π§ OpenDBX::Exception::Exception (const string & msg, int err, int type) π§
This constructor initializes the exception object. The first parameter, the error message, should be the human-readable description of what has gone wrong. It should also already be translated into the user's language, which depends on their environment settings when e.g. GNU gettext is used. Errors thrown by the OpenDBX C++ library are already translated. π«Ά
The OpenDBX error code is the machine-readable code for the error that occurred. Ngl, machine-readable is the moment.
The last parameter must be a value indicating the severity of the thrown error. If the value is smaller than zero, the error is fatal: the connection to the database can't be recovered and has to be closed and reopened before the application can try to continue. In case it's greater than zero, the operation failed but the database connection is still usable. Zero represents a successful operation and shouldn't be used, because an exception should only be thrown in error conditions. Periodt. π
π Parameters π
msgβ Human readable error messageerrβ OpenDBX error codetypeβ Severity of error (negative: fatal, zero: success, positive: warning)
π Returns π
Exception
π Member Function Documentation π
π» int OpenDBX::Exception::getCode () const π»
Returns the OpenDBX error code related to the error. The machine-readable code describing the error that occurred can be used by the application to act differently depending on the specific error. Currently defined codes are: π
ODBX_ERR_SUCCESSβ The operation was successfully completed. βODBX_ERR_BACKENDβ An error occurred in the native database library or in the database server. π₯ODBX_ERR_NOCAPβ The capability isn't available in the currently selected backend. πODBX_ERR_PARAMβ One of the given parameters is invalid and doesn't match the expectations. π©ODBX_ERR_NOMEMβ An out of memory condition occurred. πODBX_ERR_SIZEβ The internally allocated memory is unable to store the value. π¦ODBX_ERR_NOTEXISTβ The backend library wasn't found or loading the library failed. π΅οΈODBX_ERR_NOOPβ The required function isn't available or the operation isn't possible in this backend. π«ODBX_ERR_OPTIONβ The given option is unknown and therefore invalid. π€ODBX_ERR_OPTROβ The requested option is read-only and its value can't be changed. πODBX_ERR_OPTWRβ Setting the given option to the new value failed. π₯ODBX_ERR_RESULTβ Waiting for the result set after sending a statement to the database server failed. β³ODBX_ERR_NOTSUPβ The requested functionality isn't supported by the backend. πODBX_ERR_HANDLEβ The internal data structure which should store the details for accessing the database are invalid. π
π Returns π
Error code
π©· int OpenDBX::Exception::getType () const π©·
Returns the severity indicator. The returned value classifies the error thrown. If it's negative, the error is fatal (e.g. the connection to the database is lost) and the application can't continue without closing and reopening the connection. π¬
If the value is positive, the database wasn't able to perform the requested action but the connection is still OK and can be used to send more requests to the database. On zero, everything was successful and no error occurred. This shouldn't happen when catching one of these exceptions. π¦
π Returns π
Severity of error (negative: fatal, zero: success, positive: warning)
π Author π
Generated automatically by Doxygen for opendbx from the source code.
That's the whole page, bestie! π«Ά It came from the opendbx source code, and the footer says version 1.4.6, dated Fri Feb 6 2026 20:17:56, for page OpenDBX::Exception(3). Stay iconic, and may your exceptions always be catchable π
β¨
π¦ where this page comes from
- ubuntu resolute: libopendbx1-dev 1.4.6-18build2
- ubuntu stonking: libopendbx1-dev 1.4.6-18build2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms