mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-poco.git
synced 2025-11-07 22:13:15 +00:00
Data/SQLite: Exception messages contain duplicate text #2012
This commit is contained in:
@@ -182,14 +182,14 @@ void SessionImpl::open(const std::string& connect)
|
||||
{
|
||||
ActiveConnector connector(connectionString(), &_pDB);
|
||||
ActiveResult<int> result = connector.connect();
|
||||
if (!result.tryWait(getLoginTimeout() * 1000))
|
||||
if (!result.tryWait(static_cast<long>(getLoginTimeout() * 1000)))
|
||||
throw ConnectionFailedException("Timed out.");
|
||||
|
||||
int rc = result.data();
|
||||
if (rc != 0)
|
||||
{
|
||||
close();
|
||||
Utility::throwException(rc);
|
||||
Utility::throwException(_pDB, rc);
|
||||
}
|
||||
}
|
||||
catch (SQLiteException& ex)
|
||||
@@ -221,9 +221,9 @@ bool SessionImpl::isConnected()
|
||||
|
||||
void SessionImpl::setConnectionTimeout(std::size_t timeout)
|
||||
{
|
||||
int tout = 1000 * timeout;
|
||||
int tout = static_cast<int>(1000 * timeout);
|
||||
int rc = sqlite3_busy_timeout(_pDB, tout);
|
||||
if (rc != 0) Utility::throwException(rc);
|
||||
if (rc != 0) Utility::throwException(_pDB, rc);
|
||||
_timeout = tout;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user