本文整理汇总了C++中Poco::NotFoundException方法的典型用法代码示例。如果您正苦于以下问题:C++ Poco::NotFoundException方法的具体用法?C++ Poco::NotFoundException怎么用?C++ Poco::NotFoundException使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Poco
的用法示例。
在下文中一共展示了Poco::NotFoundException方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: checkODBCSetup
void ODBCAccessTest::checkODBCSetup()
{
static bool beenHere = false;
if (!beenHere)
{
beenHere = true;
bool driverFound = false;
bool dsnFound = false;
Utility::DriverMap::iterator itDrv = _drivers.begin();
for (; itDrv != _drivers.end(); ++itDrv)
{
if (((itDrv->first).find("Microsoft Access Driver") != std::string::npos))
{
std::cout << "Driver found: " << itDrv->first
<< " (" << itDrv->second << ')' << std::endl;
driverFound = true;
break;
}
}
if (!driverFound)
{
std::cout << "Driver NOT found, will throw." << std::endl;
throw NotFoundException("Microsoft Access ODBC driver.");
}
Utility::DSNMap::iterator itDSN = _dataSources.begin();
for (; itDSN != _dataSources.end(); ++itDSN)
{
if (((itDSN->first).find(_dsn) != std::string::npos) &&
((itDSN->second).find("Microsoft Access Driver") != std::string::npos))
{
std::cout << "DSN found: " << itDSN->first
<< " (" << itDSN->second << ')' << std::endl;
dsnFound = true;
break;
}
}
if (!dsnFound)
{
std::cout << "Access DSN NOT found, tests will fail." << std::endl;
return;
}
}
if (!_pSession)
format(_dbConnString, "DSN=%s;Uid=Admin;Pwd=;", _dsn);
}