Handle exceptions from kiwix::Downloader::close()

This commit is contained in:
Veloman Yunkan 2024-04-11 16:31:10 +04:00 committed by Kelson
parent ccccc80dfe
commit 11cdeb9faa

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) {