Load save-state for Cards: improve error messages. (#1025)

. better error message for (unlikely) slot mismatch.
. better error message if load state version is invalid.
This commit is contained in:
Andrea
2022-01-30 21:25:40 +00:00
committed by GitHub
parent 24378313c3
commit 7ab65492c6
18 changed files with 196 additions and 148 deletions
+1 -1
View File
@@ -113,7 +113,7 @@ void SAMCard::SaveSnapshot(YamlSaveHelper& yamlSaveHelper)
bool SAMCard::LoadSnapshot(YamlLoadHelper& yamlLoadHelper, UINT version)
{
if (version < 1 || version > kUNIT_VERSION)
throw std::runtime_error("Card: wrong version");
ThrowErrorInvalidVersion(version);
return true;
}