mirror of
https://github.com/OpenMW/openmw.git
synced 2025-05-16 13:11:28 +00:00
Add UniversalId argument type to exception message on invalid access
This commit is contained in:
parent
292983d57a
commit
0aa569d4fe
1 changed files with 2 additions and 2 deletions
|
@ -360,7 +360,7 @@ const std::string& CSMWorld::UniversalId::getId() const
|
||||||
if (const std::string* result = std::get_if<std::string>(&mValue))
|
if (const std::string* result = std::get_if<std::string>(&mValue))
|
||||||
return *result;
|
return *result;
|
||||||
|
|
||||||
throw std::logic_error("invalid access to ID of non-ID UniversalId");
|
throw std::logic_error("invalid access to ID of " + ::toString(getArgumentType()) + " UniversalId");
|
||||||
}
|
}
|
||||||
|
|
||||||
int CSMWorld::UniversalId::getIndex() const
|
int CSMWorld::UniversalId::getIndex() const
|
||||||
|
@ -368,7 +368,7 @@ int CSMWorld::UniversalId::getIndex() const
|
||||||
if (const int* result = std::get_if<int>(&mValue))
|
if (const int* result = std::get_if<int>(&mValue))
|
||||||
return *result;
|
return *result;
|
||||||
|
|
||||||
throw std::logic_error("invalid access to index of non-index UniversalId");
|
throw std::logic_error("invalid access to index of " + ::toString(getArgumentType()) + " UniversalId");
|
||||||
}
|
}
|
||||||
|
|
||||||
ESM::RefId CSMWorld::UniversalId::getRefId() const
|
ESM::RefId CSMWorld::UniversalId::getRefId() const
|
||||||
|
|
Loading…
Reference in a new issue