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

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