#538 prevent destructors from throwing exceptions

This commit is contained in:
Guenter Obiltschnig
2014-09-19 09:46:49 +02:00
parent c8686a727d
commit 544229302e
60 changed files with 555 additions and 131 deletions

View File

@@ -64,15 +64,22 @@ HTTPSession::HTTPSession(const StreamSocket& socket, bool keepAlive):
HTTPSession::~HTTPSession()
{
if (_pBuffer) HTTPBufferAllocator::deallocate(_pBuffer, HTTPBufferAllocator::BUFFER_SIZE);
try
{
close();
if (_pBuffer) HTTPBufferAllocator::deallocate(_pBuffer, HTTPBufferAllocator::BUFFER_SIZE);
try
{
close();
}
catch (...)
{
}
delete _pException;
}
catch (...)
{
poco_unexpected();
}
delete _pException;
}