1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Merge pull request #6193 from MichalZr6/mod_incompability_errors

Rework handling some errors and uncought exceptions
This commit is contained in:
Ivan Savenko
2025-10-05 12:15:17 +03:00
committed by GitHub
20 changed files with 117 additions and 83 deletions

View File

@@ -408,9 +408,9 @@ TObjectTypeHandler CObjectClassesHandler::getHandlerFor(const std::string & scop
return object->objectTypeHandlers.at(subID.value());
}
std::string errorString = "Failed to find object of type " + type + "::" + subtype;
logGlobal->error(errorString);
throw std::runtime_error(errorString);
std::string objectType = type + "::" + subtype;
logGlobal->error("Failed to find object of type %s", objectType);
throw IdentifierResolutionException(objectType);
}
TObjectTypeHandler CObjectClassesHandler::getHandlerFor(CompoundMapObjectID compoundIdentifier) const