pDb = pDBConnectionInfo->pDBConnection;
} else {
DRM_TAPPS_LOG("no connection exists..");
- std::unique_ptr<DtappsDBConnectionInfo> pDBConnectionInfo(
- new(std::nothrow) DtappsDBConnectionInfo);
-
- if (pDBConnectionInfo == NULL)
+ std::unique_ptr<DtappsDBConnectionInfo> pDBConnectionInfo;
+ try {
+ pDBConnectionInfo.reset(new DtappsDBConnectionInfo);
+ } catch (const std::bad_alloc &) {
return FALSE;
+ }
DRM_TAPPS_FRQ_LOG("Opening DB connection.");