From 33f67651c2befb0eddfe08eaf3474801c8370984 Mon Sep 17 00:00:00 2001 From: Laserlicht <13953785+Laserlicht@users.noreply.github.com> Date: Sat, 6 Dec 2025 12:44:14 +0100 Subject: [PATCH] fix non handled errors --- client/CServerHandler.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/client/CServerHandler.cpp b/client/CServerHandler.cpp index 7e4c962b8..49caa407b 100644 --- a/client/CServerHandler.cpp +++ b/client/CServerHandler.cpp @@ -695,7 +695,18 @@ void CServerHandler::endGameplay() std::optional CServerHandler::canQuickLoadGame(const std::string & path) const { auto mapInfo = std::make_shared(); - mapInfo->saveInit(ResourcePath(path, EResType::SAVEGAME)); + try + { + mapInfo->saveInit(ResourcePath(path, EResType::SAVEGAME)); + } + catch(const IdentifierResolutionException & e) + { + return "Identifier not found."; + } + catch(const std::exception & e) + { + return "Generic error loading save."; + } // initial start info from quick load slot const auto * startInfo1 = mapInfo->scenarioOptionsOfSave.get();