Exception in destructor (#1777)

* The destructor of BasicBufferedStreamBuf() calls Allocator::deallocate which can throw exceptions. In particular it throws Poco::SystemException when can't lock mutex.

* Added poco_unexpected(); into exception handler
This commit is contained in:
Iskandar Safarov 2017-07-03 04:04:58 +10:00 committed by Aleksandar Fabijanic
parent a33057d8fe
commit d7d6b739a2

View File

@ -67,7 +67,13 @@ public:
~BasicBufferedStreamBuf()
{
Allocator::deallocate(_pBuffer, _bufsize);
try
{
Allocator::deallocate(_pBuffer, _bufsize);
} catch (...)
{
poco_unexpected();
}
}
virtual int_type overflow(int_type c)