I'm currently using MySQL libraries compiled using POCO C++. I encountered a problem: I couldn't catch any exception thrown by the library. Therefore, the program is always terminated without any message printed out the console, even I tried to catch Poco::Exception or std::exception. Anyone knows how to fix this issue? Below is a sample code fragment I used
- Code: Select all
try
{
//get a session from session pool.
Session _session = (*sessionPool).get();
return _session ;
}
catch (SessionPoolExhaustedException spee)
{
cout << "Session pool exhausted";
}
catch (Exception& pocoEx)
{
cout << "POCO exception";
}
catch (exception ex)
{
cout << "Exception";
}





