1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Provide more information in thrown exceptions for unfixed crashes

This commit is contained in:
Ivan Savenko
2024-04-22 16:40:43 +03:00
parent 82b921d852
commit 5454d01316
4 changed files with 17 additions and 8 deletions

View File

@@ -1257,7 +1257,7 @@ void CGObelisk::setPropertyDer(ObjProperty what, ObjPropertyID identifier)
if(progress > cb->gameState()->map->obeliskCount)
{
logGlobal->error("Visited %d of %d", static_cast<int>(progress), cb->gameState()->map->obeliskCount);
throw std::runtime_error("Player visited more obelisks than present on map!");
throw std::runtime_error("Player visited " + std::to_string(progress) + " obelisks out of " + std::to_string(cb->gameState()->map->obeliskCount) + " present on map!");
}
break;