Hello,
I'm trying to use exceptions in mysql++ but i can only catch exceptions of
type 'exception'.
For example, in:
try {
query.execute("blabla");
}
catch(BadQuery& e) {
cout << "Bad Query: " << e.what() << endl;
}
catch(Exception& e) {
cout << "Exception: " << e.what() << endl;
}
catch(exception& e) {
cout << "DAMN!" << endl;
}
The BadQuery (and even the Exception) will be never catched... The result is
always: DAMN! This is ofcourse quite annoying since i have to do:
try {
query << "blablaba";
queryString = query.str();
}
catch(exception& e) {
cout << "unable to execute: " << queryString << endl;
}
I'm using mysql++-2.0.4 and i ran the configure script with
'--with-exception' as argument. Furthermore i've done:
connection con(true);
con.connect(...);
I hope someone can give me some advice,
Jonatan