mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-30 15:36:45 +00:00
[Client] Add clearer debug for bad LiveCellRef casts
This commit is contained in:
parent
89eb01f2dc
commit
eb1c894038
1 changed files with 19 additions and 2 deletions
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue