Merge pull request #1081 from kiwix/kiwix_Downloader_close_may_throw

Handling of exceptions from kiwix::Downloader::close()
This commit is contained in:
Kelson 2024-04-12 12:48:18 +02:00 committed by GitHub
commit 0b18cc6a32
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -125,7 +125,12 @@ KiwixApp::~KiwixApp()
{
m_server.stop();
if (mp_downloader) {
mp_downloader->close();
try {
mp_downloader->close();
} catch (const std::exception& err) {
std::cerr << "ERROR: Failed to save the downloader state: "
<< err.what() << std::endl;
}
delete mp_downloader;
}
if (mp_manager) {