throw std::runtime_error instead of std::string (PR #1011)

+ add more information about location of yaml parser error.
This commit is contained in:
Andrea
2021-12-18 16:37:28 +00:00
committed by GitHub
parent 651b57fdae
commit 47f721882e
23 changed files with 113 additions and 115 deletions
+1 -1
View File
@@ -230,7 +230,7 @@ void SNESMAXCard::SaveSnapshot(YamlSaveHelper& yamlSaveHelper)
bool SNESMAXCard::LoadSnapshot(YamlLoadHelper& yamlLoadHelper, UINT version)
{
if (version < 1 || version > kUNIT_VERSION)
throw std::string("Card: wrong version");
throw std::runtime_error("Card: wrong version");
m_buttonIndex = yamlLoadHelper.LoadUint(SS_YAML_KEY_BUTTON_INDEX);