drogon
C++14/17-based HTTP application framework
Loading...
Searching...
No Matches
drogon::orm::SqlError Class Reference

Exception class for failed queries. More...

#include <drogon/orm/Exception.h>

Inheritance diagram for drogon::orm::SqlError:
Collaboration diagram for drogon::orm::SqlError:

Public Member Functions

DROGON_EXPORT SqlError (const std::string &msg="", const std::string &Q="", const char sqlstate[]=nullptr)
DROGON_EXPORT SqlError (const std::string &msg, const std::string &Q, const int errcode, const int extendedErrcode)
DROGON_EXPORT const std::string & query () const noexcept
 The query whose execution triggered the exception.
DROGON_EXPORT const std::string & sqlState () const noexcept
DROGON_EXPORT int errcode () const noexcept
DROGON_EXPORT int extendedErrcode () const noexcept
Public Member Functions inherited from drogon::orm::Failure
DROGON_EXPORT Failure (const std::string &)
Public Member Functions inherited from drogon::orm::DrogonDbException
virtual ~DrogonDbException () noexcept
 Support run-time polymorphism, and keep this class abstract.

Detailed Description

Exception class for failed queries.

Carries, in addition to a regular error message, a copy of the failed query and (if available) the SQLSTATE value accompanying the error.


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