Improve error reporting
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12949 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
3adecbefee
commit
ddec322a01
@ -34,6 +34,7 @@
|
|||||||
#include "utils/string_utils.hpp"
|
#include "utils/string_utils.hpp"
|
||||||
#include "modes/world.hpp"
|
#include "modes/world.hpp"
|
||||||
#include "tracks/track.hpp"
|
#include "tracks/track.hpp"
|
||||||
|
#include "utils/log.hpp"
|
||||||
|
|
||||||
#include <IGPUProgrammingServices.h>
|
#include <IGPUProgrammingServices.h>
|
||||||
#include <IMaterialRendererServices.h>
|
#include <IMaterialRendererServices.h>
|
||||||
@ -873,9 +874,9 @@ void Material::initParticlesEffect(const XMLNode *node)
|
|||||||
node->get("base", &base);
|
node->get("base", &base);
|
||||||
if (base.size() < 1)
|
if (base.size() < 1)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "[Material::initParticlesEffect] WARNING: Invalid "
|
Log::warn("Material::initParticlesEffect"
|
||||||
"particle settings for material '%s'\n",
|
"Invalid particle settings for material '%s'\n",
|
||||||
m_texname.c_str());
|
m_texname.c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -883,12 +884,19 @@ void Material::initParticlesEffect(const XMLNode *node)
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
particles = pkm->getParticles(base.c_str());
|
particles = pkm->getParticles(base.c_str());
|
||||||
|
|
||||||
|
if (particles == NULL)
|
||||||
|
{
|
||||||
|
Log::warn("Material::initParticlesEffect",
|
||||||
|
"Error loading particles '%s' for material '%s'\n",
|
||||||
|
base.c_str(), m_texname.c_str());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "[Material::initParticlesEffect] WARNING: Cannot find "
|
Log::warn("Material::initParticlesEffect",
|
||||||
"particles '%s' for material '%s'\n",
|
"Cannot find particles '%s' for material '%s'\n",
|
||||||
base.c_str(), m_texname.c_str());
|
base.c_str(), m_texname.c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user