mirror of
https://github.com/pocoproject/poco.git
synced 2025-11-24 06:04:15 +01:00
#538 prevent destructors from throwing exceptions
This commit is contained in:
@@ -54,7 +54,14 @@ Decompress::Decompress(std::istream& in, const Poco::Path& outputDir, bool flatt
|
||||
|
||||
Decompress::~Decompress()
|
||||
{
|
||||
EOk -= Poco::Delegate<Decompress, std::pair<const ZipLocalFileHeader, const Poco::Path> >(this, &Decompress::onOk);
|
||||
try
|
||||
{
|
||||
EOk -= Poco::Delegate<Decompress, std::pair<const ZipLocalFileHeader, const Poco::Path> >(this, &Decompress::onOk);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
poco_unexpected();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -242,7 +242,14 @@ PartialOutputStream::PartialOutputStream(std::ostream& ostr, std::size_t start,
|
||||
|
||||
PartialOutputStream::~PartialOutputStream()
|
||||
{
|
||||
close();
|
||||
try
|
||||
{
|
||||
close();
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
poco_unexpected();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user