Allow error message to be formatted

This commit is contained in:
SirLynix
2023-08-14 23:16:37 +02:00
committed by Jérôme Leclercq
parent 25957c4b7f
commit a741672a51
119 changed files with 707 additions and 490 deletions

View File

@@ -73,7 +73,7 @@ namespace Nz
case nzsl::ImageType::Cubemap: return ImageType::Cubemap;
}
NazaraError("invalid image type 0x" + NumberToString(UnderlyingCast(imageType), 16));
NazaraError("invalid image type 0x{0}", NumberToString(UnderlyingCast(imageType), 16));
return ImageType::E2D;
}
}

View File

@@ -53,7 +53,7 @@ namespace Nz
std::size_t propertyIndex = FindTextureProperty(propertyName);
if (propertyIndex == MaterialSettings::InvalidPropertyIndex)
{
NazaraError("material has no texture property named " + std::string(propertyName));
NazaraError("material has no texture property named \"{0}\"", propertyName);
return nullptr;
}
@@ -79,7 +79,7 @@ namespace Nz
std::size_t propertyIndex = FindTextureProperty(propertyName);
if (propertyIndex == MaterialSettings::InvalidPropertyIndex)
{
NazaraError("material has no texture property named " + std::string(propertyName));
NazaraError("material has no texture property named \"{0}\"", propertyName);
return nullptr;
}
@@ -97,7 +97,7 @@ namespace Nz
std::size_t propertyIndex = FindValueProperty(propertyName);
if (propertyIndex == MaterialSettings::InvalidPropertyIndex)
{
NazaraError("material has no value property named " + std::string(propertyName));
NazaraError("material has no value property named \"{0}\"", propertyName);
return nullptr;
}
@@ -128,7 +128,7 @@ namespace Nz
std::size_t propertyIndex = FindTextureProperty(propertyName);
if (propertyIndex == MaterialSettings::InvalidPropertyIndex)
{
NazaraError("material has no texture property named " + std::string(propertyName));
NazaraError("material has no texture property named \"{0}\"", propertyName);
return;
}
@@ -140,7 +140,7 @@ namespace Nz
std::size_t propertyIndex = FindTextureProperty(propertyName);
if (propertyIndex == MaterialSettings::InvalidPropertyIndex)
{
NazaraError("material has no texture property named " + std::string(propertyName));
NazaraError("material has no texture property named \"{0}\"", propertyName);
return;
}
@@ -152,7 +152,7 @@ namespace Nz
std::size_t propertyIndex = FindTextureProperty(propertyName);
if (propertyIndex == MaterialSettings::InvalidPropertyIndex)
{
NazaraError("material has no texture property named " + std::string(propertyName));
NazaraError("material has no texture property named \"{0}\"", propertyName);
return;
}
@@ -164,7 +164,7 @@ namespace Nz
std::size_t propertyIndex = FindValueProperty(propertyName);
if (propertyIndex == MaterialSettings::InvalidPropertyIndex)
{
NazaraError("material has no value property named " + std::string(propertyName));
NazaraError("material has no value property named \"{0}\"", propertyName);
return;
}