1
0

cParsedNBT: Improved error reporting (#3876)

* cParsedNBT: Improved error reporting

* Fix typos
This commit is contained in:
peterbell10
2017-07-30 17:55:19 +01:00
committed by worktycho
parent 790e15f2e6
commit 8fbb9dbf53
5 changed files with 216 additions and 59 deletions

View File

@@ -2851,7 +2851,9 @@ void cProtocol_1_8_0::ParseItemMetadata(cItem & a_Item, const AString & a_Metada
{
AString HexDump;
CreateHexDump(HexDump, a_Metadata.data(), std::max<size_t>(a_Metadata.size(), 1024), 16);
LOGWARNING("Cannot parse NBT item metadata: (" SIZE_T_FMT " bytes)\n%s", a_Metadata.size(), HexDump.c_str());
LOGWARNING("Cannot parse NBT item metadata: %s at (" SIZE_T_FMT " / " SIZE_T_FMT " bytes)\n%s",
NBT.GetErrorCode().message().c_str(), NBT.GetErrorPos(), a_Metadata.size(), HexDump.c_str()
);
return;
}