I am trying to catch the exception like below -
try {
} catch (const std::exception& ex) {
cout << "An exception occurred when executing query. " << ex << endl;
}
But everytime I am getting this error -
no match for operator<< in std::operator<< <std::char_traits<char> >((* & std::cout), ((const char*)"An exception occurred when executing query. ")) << ex
Any idea what wrong I am doing here?