Skip to content

Error Handling #555

Answered by MarkCallow
atteneder asked this question in Q&A
Apr 8, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

There is proper error handling. All assertions are intended to check code integrity not file integrity. The latter checks normally happen during file loading and various return codes are used. Similar looking asserts are often used elsewhere to check that the code hasn't made unexpected changes to the data since the file integrity check.

In the case you point out there is a check near the top of the function

    if (colorModel != KHR_DF_MODEL_UASTC
        && This->supercompressionScheme != KTX_SS_BASIS_LZ)
    return KTX_INVALID_OPERATION; // Not in a transcodable format.

This is not quite complete as it doesn't check the color model is ETC1S when the supercompression scheme is BASIS_LZ…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@atteneder
Comment options

Answer selected by atteneder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants