Improved Error system

Former-commit-id: ddd08841d30575713f4a28ac02566f92791e5539
This commit is contained in:
Lynix
2013-09-25 09:29:25 +02:00
parent 672cbaed1d
commit a410e8856a
16 changed files with 199 additions and 51 deletions

View File

@@ -118,7 +118,7 @@ const NzShaderProgram* NzShaderProgramManager::Get(const NzShaderProgramManagerP
if (shaderFile.Read(&binary[0], size) != size)
{
NazaraError("Failed to read program binary");
return false;
return nullptr;
}
shaderFile.Close();
@@ -148,7 +148,7 @@ const NzShaderProgram* NzShaderProgramManager::Get(const NzShaderProgramManagerP
if (!programBinary.IsEmpty())
{
if (!shaderFile.Open(NzFile::Truncate | NzFile::WriteOnly) || !shaderFile.Write(programBinary))
NazaraWarning("Failed to save program binary to file \"" + programFileName + "\": " + NzGetLastSystemError());
NazaraWarning("Failed to save program binary to file \"" + programFileName + '"');
}
else
NazaraWarning("Failed to retrieve shader program binary");