mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-26 18:11:29 +02:00
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:
parent
a33057d8fe
commit
d7d6b739a2
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user