mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
mysqlxx:: Exception: tiny improvement [#CONV-2807].
This commit is contained in:
parent
5779760e0c
commit
7e0d8039ee
@ -16,6 +16,8 @@ struct Exception : public Poco::Exception
|
||||
{
|
||||
Exception(const std::string & msg, int code = 0) : Poco::Exception(msg, code) {}
|
||||
int errnum() const { return code(); }
|
||||
const char * name() const throw() { return "mysqlxx::Exception"; }
|
||||
const char * className() const throw() { return "mysqlxx::Exception"; }
|
||||
};
|
||||
|
||||
|
||||
@ -23,6 +25,8 @@ struct Exception : public Poco::Exception
|
||||
struct ConnectionFailed : public Exception
|
||||
{
|
||||
ConnectionFailed(const std::string & msg, int code = 0) : Exception(msg, code) {}
|
||||
const char * name() const throw() { return "mysqlxx::ConnectionFailed"; }
|
||||
const char * className() const throw() { return "mysqlxx::ConnectionFailed"; }
|
||||
};
|
||||
|
||||
|
||||
@ -30,6 +34,8 @@ struct ConnectionFailed : public Exception
|
||||
struct BadQuery : public Exception
|
||||
{
|
||||
BadQuery(const std::string & msg, int code = 0) : Exception(msg, code) {}
|
||||
const char * name() const throw() { return "mysqlxx::BadQuery"; }
|
||||
const char * className() const throw() { return "mysqlxx::BadQuery"; }
|
||||
};
|
||||
|
||||
|
||||
@ -37,6 +43,8 @@ struct BadQuery : public Exception
|
||||
struct CannotParseValue : public Exception
|
||||
{
|
||||
CannotParseValue(const std::string & msg, int code = 0) : Exception(msg, code) {}
|
||||
const char * name() const throw() { return "mysqlxx::CannotParseValue"; }
|
||||
const char * className() const throw() { return "mysqlxx::CannotParseValue"; }
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user