dbixx:dbixx_error
This is the exception that is thrown in case of different
errors. It is derived from std::runtime_error and thus can
be catch by std::exception.
It has an additional member function:
char const *query() const;
That returns the query (if available) that caused an exception.
For example:
try {
row r;
sql<<"SLECT 2+2",r;
}
catch(dbixx_error const &e) {
cerr<<e.query()<<endl;
cerr<<e.what()<<endl;
}
The output is
SLECT 2+2 Syntax error.
