I'm using the C++ API for Visual Studio. When errors occur during
connection, executing queries, etc, it throws a MysqlBadQuery exception. I
can see when I run it that is the exact type being thrown. However, despite
my best efforts, I can't seem to actually catch it.
Connection con;
bool result = false;
try
{
result = con.connect("test2");
}
catch (MysqlBadQuery *ex)
{
printf("error!");
}
I always get:
Unhandled exception at 0x77e73887 (kernel32.dll) in testsql.exe: Microsoft
C++ exception: MysqlBadQuery @ 0x0012f9f4.
The exception is being thrown because the specified database (test2) does
not exist - so I know it is right in that the exception is being thrown...
But I can't figure out why it won't let me catch it!