#include <exceptions.h>
Inheritance diagram for mysqlpp::ConnectionFailed:
Public Member Functions | |
ConnectionFailed (const char *w="", int e=0) | |
Create exception object. | |
int | errnum () const |
Return the error number corresponding to the error message returned by what(), if any. |
This is thrown not just on making the connection, but also on shutdown and when calling certain of Connection's methods that require a connection when there isn't one.
mysqlpp::ConnectionFailed::ConnectionFailed | ( | const char * | w = "" , |
|
int | e = 0 | |||
) | [inline, explicit] |
Create exception object.
w | explanation for why the exception was thrown | |
e | the error number from the underlying database API |
int mysqlpp::ConnectionFailed::errnum | ( | ) | const [inline] |
Return the error number corresponding to the error message returned by what(), if any.
If the error number is 0, it means that the error message doesn't come from the underlying database API, but rather from MySQL++ itself. This happens when an error condition is detected up at this higher level instead of letting the underlying database API do it.