Added more parsing errors.

This commit is contained in:
Branimir Karadžić
2017-07-06 22:47:27 -07:00
parent f7464e0c1e
commit 50332a81ba
2 changed files with 16 additions and 1 deletions

View File

@@ -2413,7 +2413,6 @@ namespace bimg
if (identifier[1] != '1'
&& identifier[2] != '1')
{
BX_ERROR_SET(_err, BIMG_ERROR, "Unknown KTX identifier.");
return false;
}

View File

@@ -264,6 +264,10 @@ namespace bimg
}
}
}
else
{
BX_ERROR_SET(_err, BIMG_ERROR, "PNG: Unsupported format.");
}
}
lodepng_state_cleanup(&state);
@@ -420,12 +424,24 @@ namespace bimg
}
}
}
else
{
BX_ERROR_SET(_err, BIMG_ERROR, "EXR: Couldn't find R channel.");
}
FreeEXRImage(&exrImage);
}
else
{
BX_ERROR_SET(_err, BIMG_ERROR, "EXR: Failed to parse image.");
}
FreeEXRHeader(&exrHeader);
}
else
{
BX_ERROR_SET(_err, BIMG_ERROR, "EXR: Failed to parse header.");
}
ImageContainer* output = NULL;
if (NULL != data)