feat: improve error messages when parsing an info string file fails

This commit is contained in:
Jan
2024-05-12 22:29:40 +02:00
parent 30394e6a4c
commit 5d913acfef
12 changed files with 21 additions and 11 deletions

View File

@ -126,7 +126,7 @@ bool AssetLoaderPhysPreset::LoadFromRaw(
InfoString infoString;
if (!infoString.FromStream(ObjConstants::INFO_STRING_PREFIX_PHYS_PRESET, *file.m_stream))
{
std::cout << "Failed to read phys preset raw file: \"" << fileName << "\"\n";
std::cerr << "Could not parse as info string file: \"" << fileName << "\"\n";
return true;
}

View File

@ -440,7 +440,7 @@ bool AssetLoaderWeapon::LoadFromRaw(
InfoString infoString;
if (!infoString.FromStream(ObjConstants::INFO_STRING_PREFIX_WEAPON, *file.m_stream))
{
std::cerr << "Failed to read weapon raw file: \"" << fileName << "\"\n";
std::cerr << "Could not parse as info string file: \"" << fileName << "\"\n";
return true;
}

View File

@ -870,7 +870,7 @@ bool AssetLoaderWeapon::LoadFromRaw(
InfoString infoString;
if (!infoString.FromStream(ObjConstants::INFO_STRING_PREFIX_WEAPON, *file.m_stream))
{
std::cerr << "Failed to read weapon raw file: \"" << fileName << "\"\n";
std::cerr << "Could not parse as info string file: \"" << fileName << "\"\n";
return true;
}

View File

@ -146,7 +146,7 @@ bool AssetLoaderPhysConstraints::LoadFromRaw(
InfoString infoString;
if (!infoString.FromStream(ObjConstants::INFO_STRING_PREFIX_PHYS_CONSTRAINTS, *file.m_stream))
{
std::cout << "Failed to read phys constraints raw file: \"" << fileName << "\"\n";
std::cerr << "Could not parse as info string file: \"" << fileName << "\"\n";
return true;
}

View File

@ -129,7 +129,7 @@ bool AssetLoaderPhysPreset::LoadFromRaw(
InfoString infoString;
if (!infoString.FromStream(ObjConstants::INFO_STRING_PREFIX_PHYS_PRESET, *file.m_stream))
{
std::cout << "Failed to read phys preset raw file: \"" << fileName << "\"\n";
std::cerr << "Could not parse as info string file: \"" << fileName << "\"\n";
return true;
}

View File

@ -112,7 +112,7 @@ bool AssetLoaderTracer::LoadFromRaw(
InfoString infoString;
if (!infoString.FromStream(ObjConstants::INFO_STRING_PREFIX_TRACER, *file.m_stream))
{
std::cout << "Failed to read tracer raw file: \"" << fileName << "\"\n";
std::cerr << "Could not parse as info string file: \"" << fileName << "\"\n";
return true;
}

View File

@ -175,7 +175,7 @@ bool AssetLoaderVehicle::LoadFromRaw(
InfoString infoString;
if (!infoString.FromStream(ObjConstants::INFO_STRING_PREFIX_VEHICLE, *file.m_stream))
{
std::cout << "Failed to read vehicle raw file: \"" << fileName << "\"\n";
std::cerr << "Could not parse as info string file: \"" << fileName << "\"\n";
return true;
}

View File

@ -621,7 +621,7 @@ bool AssetLoaderWeapon::LoadFromRaw(
InfoString infoString;
if (!infoString.FromStream(ObjConstants::INFO_STRING_PREFIX_WEAPON, *file.m_stream))
{
std::cerr << "Failed to read weapon raw file: \"" << fileName << "\"\n";
std::cerr << "Could not parse as info string file: \"" << fileName << "\"\n";
return true;
}

View File

@ -165,7 +165,7 @@ bool AssetLoaderWeaponAttachment::LoadFromRaw(
InfoString infoString;
if (!infoString.FromStream(ObjConstants::INFO_STRING_PREFIX_WEAPON_ATTACHMENT, *file.m_stream))
{
std::cerr << "Failed to read attachment raw file: \"" << fileName << "\"\n";
std::cerr << "Could not parse as info string file: \"" << fileName << "\"\n";
return true;
}

View File

@ -285,7 +285,7 @@ bool AssetLoaderWeaponAttachmentUnique::LoadFromRaw(
InfoString infoString;
if (!infoString.FromStream(ObjConstants::INFO_STRING_PREFIX_WEAPON_ATTACHMENT_UNIQUE, *file.m_stream))
{
std::cerr << "Failed to read attachment unique raw file: \"" << fileName << "\"\n";
std::cerr << "Could not parse as info string file: \"" << fileName << "\"\n";
return true;
}

View File

@ -126,7 +126,7 @@ bool AssetLoaderZBarrier::LoadFromRaw(
InfoString infoString;
if (!infoString.FromStream(ObjConstants::INFO_STRING_PREFIX_ZBARRIER, *file.m_stream))
{
std::cout << "Failed to read zbarrier raw file: \"" << fileName << "\"\n";
std::cerr << "Could not parse as info string file: \"" << fileName << "\"\n";
return true;
}