1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-04-01 15:06:43 +00:00

[Client] Add clearer debug for bad LiveCellRef casts

This commit is contained in:
David Cernat 2022-05-03 23:29:20 +03:00
parent 89eb01f2dc
commit eb1c894038

View file

@ -52,7 +52,16 @@ namespace MWWorld
std::stringstream str;
str<< "Bad LiveCellRef cast to "<<typeid(T).name()<<" from ";
if(mRef != nullptr) str<< getTypeName();
/*
Start of tes3mp change (major)
Print additional information
*/
if(mRef != nullptr) str<< getTypeName() << " " << mRef->mRef.getRefId().c_str() << " " << mRef->mRef.getRefNum().mIndex << "-" << mRef->mRef.getMpNum();
/*
End of tes3mp change (major)
*/
else str<< "an empty object";
throw std::runtime_error(str.str());
@ -128,7 +137,15 @@ namespace MWWorld
std::stringstream str;
str<< "Bad LiveCellRef cast to "<<typeid(T).name()<<" from ";
if(mRef != nullptr) str<< getTypeName();
/*
Start of tes3mp change (major)
Print additional information
*/
if(mRef != nullptr) str<< getTypeName() << " " << mRef->mRef.getRefId().c_str() << " " << mRef->mRef.getRefNum().mIndex << "-" << mRef->mRef.getMpNum();
/*
End of tes3mp change (major)
*/
else str<< "an empty object";
throw std::runtime_error(str.str());