mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-25 01:19:06 +02:00
#538 more dtor fixes and some style fixes along the way
This commit is contained in:
parent
135c10c0f5
commit
a2617235fe
@ -51,23 +51,23 @@ void Binder::freeMemory()
|
|||||||
{
|
{
|
||||||
LengthVec::iterator itLen = _lengthIndicator.begin();
|
LengthVec::iterator itLen = _lengthIndicator.begin();
|
||||||
LengthVec::iterator itLenEnd = _lengthIndicator.end();
|
LengthVec::iterator itLenEnd = _lengthIndicator.end();
|
||||||
for(; itLen != itLenEnd; ++itLen) delete *itLen;
|
for (; itLen != itLenEnd; ++itLen) delete *itLen;
|
||||||
|
|
||||||
TimeMap::iterator itT = _times.begin();
|
TimeMap::iterator itT = _times.begin();
|
||||||
TimeMap::iterator itTEnd = _times.end();
|
TimeMap::iterator itTEnd = _times.end();
|
||||||
for(; itT != itTEnd; ++itT) delete itT->first;
|
for (; itT != itTEnd; ++itT) delete itT->first;
|
||||||
|
|
||||||
DateMap::iterator itD = _dates.begin();
|
DateMap::iterator itD = _dates.begin();
|
||||||
DateMap::iterator itDEnd = _dates.end();
|
DateMap::iterator itDEnd = _dates.end();
|
||||||
for(; itD != itDEnd; ++itD) delete itD->first;
|
for (; itD != itDEnd; ++itD) delete itD->first;
|
||||||
|
|
||||||
TimestampMap::iterator itTS = _timestamps.begin();
|
TimestampMap::iterator itTS = _timestamps.begin();
|
||||||
TimestampMap::iterator itTSEnd = _timestamps.end();
|
TimestampMap::iterator itTSEnd = _timestamps.end();
|
||||||
for(; itTS != itTSEnd; ++itTS) delete itTS->first;
|
for (; itTS != itTSEnd; ++itTS) delete itTS->first;
|
||||||
|
|
||||||
StringMap::iterator itStr = _strings.begin();
|
StringMap::iterator itStr = _strings.begin();
|
||||||
StringMap::iterator itStrEnd = _strings.end();
|
StringMap::iterator itStrEnd = _strings.end();
|
||||||
for(; itStr != itStrEnd; ++itStr) std::free(itStr->first);
|
for (; itStr != itStrEnd; ++itStr) std::free(itStr->first);
|
||||||
|
|
||||||
CharPtrVec::iterator itChr = _charPtrs.begin();
|
CharPtrVec::iterator itChr = _charPtrs.begin();
|
||||||
CharPtrVec::iterator endChr = _charPtrs.end();
|
CharPtrVec::iterator endChr = _charPtrs.end();
|
||||||
|
@ -64,11 +64,11 @@ ODBCStatementImpl::~ODBCStatementImpl()
|
|||||||
{
|
{
|
||||||
ColumnPtrVecVec::iterator it = _columnPtrs.begin();
|
ColumnPtrVecVec::iterator it = _columnPtrs.begin();
|
||||||
ColumnPtrVecVec::iterator end = _columnPtrs.end();
|
ColumnPtrVecVec::iterator end = _columnPtrs.end();
|
||||||
for(; it != end; ++it)
|
for (; it != end; ++it)
|
||||||
{
|
{
|
||||||
ColumnPtrVec::iterator itC = it->begin();
|
ColumnPtrVec::iterator itC = it->begin();
|
||||||
ColumnPtrVec::iterator endC = it->end();
|
ColumnPtrVec::iterator endC = it->end();
|
||||||
for(; itC != endC; ++itC) delete *itC;
|
for (; itC != endC; ++itC) delete *itC;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
~CopyBinding()
|
~CopyBinding()
|
||||||
/// Destroys the Binding.
|
/// Destroys the CopyBinding.
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -264,7 +264,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
~CopyBinding()
|
~CopyBinding()
|
||||||
/// Destroys the Binding.
|
/// Destroys the CopyBinding.
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -396,7 +396,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
~CopyBinding()
|
~CopyBinding()
|
||||||
/// Destroys the Binding.
|
/// Destroys the CopyBinding.
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -559,7 +559,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
~CopyBinding()
|
~CopyBinding()
|
||||||
/// Destroys the Binding.
|
/// Destroys the CopyBinding.
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -689,7 +689,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
~CopyBinding()
|
~CopyBinding()
|
||||||
/// Destroys the Binding.
|
/// Destroys the CopyBinding.
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -819,7 +819,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
~CopyBinding()
|
~CopyBinding()
|
||||||
/// Destroys the Binding.
|
/// Destroys the CopyBinding.
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -949,7 +949,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
~CopyBinding()
|
~CopyBinding()
|
||||||
/// Destroys the Binding.
|
/// Destroys the CopyBinding.
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1079,7 +1079,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
~CopyBinding()
|
~CopyBinding()
|
||||||
/// Destroys the Binding.
|
/// Destroys the CopyBinding.
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1209,7 +1209,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
~CopyBinding()
|
~CopyBinding()
|
||||||
/// Destroys the Binding.
|
/// Destroys the CopyBinding.
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1339,7 +1339,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
~CopyBinding()
|
~CopyBinding()
|
||||||
/// Destroys the Binding.
|
/// Destroys the CopyBinding.
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,7 +86,8 @@ Poco::Dynamic::Var& Row::get(std::size_t col)
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
return _values.at(col);
|
return _values.at(col);
|
||||||
}catch (std::out_of_range& re)
|
}
|
||||||
|
catch (std::out_of_range& re)
|
||||||
{
|
{
|
||||||
throw RangeException(re.what());
|
throw RangeException(re.what());
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,14 @@ public:
|
|||||||
}
|
}
|
||||||
inline ~ScopedUnlock()
|
inline ~ScopedUnlock()
|
||||||
{
|
{
|
||||||
_mutex.lock();
|
try
|
||||||
|
{
|
||||||
|
_mutex.lock();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -62,6 +62,7 @@ SortedDirectoryIterator::~SortedDirectoryIterator()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SortedDirectoryIterator& SortedDirectoryIterator::operator ++()
|
SortedDirectoryIterator& SortedDirectoryIterator::operator ++()
|
||||||
{
|
{
|
||||||
if (!_is_finished)
|
if (!_is_finished)
|
||||||
|
@ -29,7 +29,14 @@ SplitterChannel::SplitterChannel()
|
|||||||
|
|
||||||
SplitterChannel::~SplitterChannel()
|
SplitterChannel::~SplitterChannel()
|
||||||
{
|
{
|
||||||
close();
|
try
|
||||||
|
{
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -39,7 +39,14 @@ Cursor::Cursor(const std::string& fullCollectionName, QueryRequest::Flags flags)
|
|||||||
|
|
||||||
Cursor::~Cursor()
|
Cursor::~Cursor()
|
||||||
{
|
{
|
||||||
poco_assert_dbg(!_response.cursorID());
|
try
|
||||||
|
{
|
||||||
|
poco_assert_dbg(!_response.cursorID());
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -64,28 +64,33 @@ FTPClientSession::FTPClientSession(const std::string& host,
|
|||||||
Poco::UInt16 port,
|
Poco::UInt16 port,
|
||||||
const std::string& username,
|
const std::string& username,
|
||||||
const std::string& password):
|
const std::string& password):
|
||||||
_host(host),
|
_host(host),
|
||||||
_port(port),
|
_port(port),
|
||||||
_pControlSocket(new DialogSocket(SocketAddress(host, port))),
|
_pControlSocket(new DialogSocket(SocketAddress(host, port))),
|
||||||
_pDataStream(0),
|
_pDataStream(0),
|
||||||
_passiveMode(true),
|
_passiveMode(true),
|
||||||
_fileType(TYPE_BINARY),
|
_fileType(TYPE_BINARY),
|
||||||
_supports1738(true),
|
_supports1738(true),
|
||||||
_serverReady(false),
|
_serverReady(false),
|
||||||
_isLoggedIn(false),
|
_isLoggedIn(false),
|
||||||
_timeout(DEFAULT_TIMEOUT)
|
_timeout(DEFAULT_TIMEOUT)
|
||||||
{
|
{
|
||||||
if (!username.empty())
|
if (!username.empty())
|
||||||
login(username, password);
|
login(username, password);
|
||||||
else
|
else
|
||||||
_pControlSocket->setReceiveTimeout(_timeout);
|
_pControlSocket->setReceiveTimeout(_timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
FTPClientSession::~FTPClientSession()
|
FTPClientSession::~FTPClientSession()
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
try { close(); }
|
close();
|
||||||
catch (...) { }
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -126,7 +131,9 @@ void FTPClientSession::open(const std::string& host,
|
|||||||
_host = host;
|
_host = host;
|
||||||
_port = port;
|
_port = port;
|
||||||
if (!username.empty())
|
if (!username.empty())
|
||||||
|
{
|
||||||
login(username, password);
|
login(username, password);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_pControlSocket = new DialogSocket(SocketAddress(_host, _port));
|
_pControlSocket = new DialogSocket(SocketAddress(_host, _port));
|
||||||
@ -168,12 +175,12 @@ void FTPClientSession::login(const std::string& username, const std::string& pas
|
|||||||
|
|
||||||
|
|
||||||
void FTPClientSession::logout()
|
void FTPClientSession::logout()
|
||||||
{
|
{
|
||||||
if (!isOpen())
|
if (!isOpen())
|
||||||
throw FTPException("Connection is closed.");
|
throw FTPException("Connection is closed.");
|
||||||
|
|
||||||
if (_isLoggedIn)
|
if (_isLoggedIn)
|
||||||
{
|
{
|
||||||
try { endTransfer(); }
|
try { endTransfer(); }
|
||||||
catch (...) { }
|
catch (...) { }
|
||||||
std::string response;
|
std::string response;
|
||||||
|
@ -66,6 +66,7 @@ SecureSocketImpl::~SecureSocketImpl()
|
|||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
|
poco_unexpected();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user