more client loading error handling

This commit is contained in:
T1ti
2024-05-17 03:53:17 +02:00
parent 11fdd9660c
commit e52d06ff68

View File

@@ -290,9 +290,19 @@ namespace Noggit::Project
project->ClientData = std::make_shared<BlizzardArchive::ClientData>(
project->ClientPath, client_archive_version, client_archive_locale, project_path.generic_string());
}
catch (BlizzardArchive::Exceptions::Locale::LocaleNotFoundError&)
catch (BlizzardArchive::Exceptions::Locale::LocaleNotFoundError& e)
{
QMessageBox::critical(nullptr, "Error", "The client does not appear to be valid.");
QMessageBox::critical(nullptr, "Error", e.what());
return {};
}
catch (BlizzardArchive::Exceptions::Locale::IncorrectLocaleModeError& e)
{
QMessageBox::critical(nullptr, "Error", e.what());
return {};
}
catch (BlizzardArchive::Exceptions::Archive::ArchiveOpenError& e)
{
QMessageBox::critical(nullptr, "Error", e.what());
return {};
}