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

Exception class for lost or failed backend connection. More...

#include <drogon/orm/Exception.h>

Inheritance diagram for drogon::orm::BrokenConnection:
Collaboration diagram for drogon::orm::BrokenConnection:

Public Member Functions

DROGON_EXPORT BrokenConnection (const std::string &)
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 lost or failed backend connection.

Warning
When this happens on Unix-like systems, you may also get a SIGPIPE signal. That signal aborts the program by default, so if you wish to be able to continue after a connection breaks, be sure to disarm this signal.

If you're working on a Unix-like system, see the manual page for signal (2) on how to deal with SIGPIPE. The easiest way to make this signal harmless is to make your program ignore it:

#include <signal.h>
int main()
{
signal(SIGPIPE, SIG_IGN);
// ...

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