sql_exception

Detailed Description

Exception class for SQL related errors.

Thrown for SQL errors. Inherits from std::runtime_error.

Example:

try {
con.executeQuery("invalid query");
} catch (const zdb::sql_exception& e) {
std::cout << "SQL error: " << e.what() << std::endl;
}
Exception class for SQL related errors.
Definition zdbpp.h:275

Public Member Functions

 sql_exception (const char *msg="SQLException")
 Constructs a new sql_exception with an optional error message.
 

Constructor & Destructor Documentation

◆ sql_exception()

sql_exception ( const char * msg = "SQLException")
explicit

Constructs a new sql_exception with an optional error message.

Parameters
msgA C-string representing the error message. Defaults to "SQLException".

Copyright © Tildeslash Ltd. All rights reserved.