Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide better failure codes #18

Open
AndrewSav opened this issue Feb 22, 2016 · 3 comments
Open

Provide better failure codes #18

AndrewSav opened this issue Feb 22, 2016 · 3 comments

Comments

@AndrewSav
Copy link

When compression returns LZHAM_COMP_STATUS_FAILED there is no way to tell what went wrong. And if you look at the code, there are around 10 different decision points that can result in LZHAM_COMP_STATUS_FAILED be returned. You have to actually debug through the library code, to find out where exactly it's failed.

Some better feedback on the library part here, will be most appreciated.

@richgel999
Copy link
Owner

This has been addressed in lzham_codec_devel:
https://github.com/richgel999/lzham_codec_devel

(Once GDC is over lzham_codec_devel will replace lzham_codec.)

@AndrewSav
Copy link
Author

Thank you for this. Could you please clarify how this is addressed? I cannot spot the difference; For example lzham_compress_memory signature looks the same and lzham_compress_status_t enum also looks the same.

Also, could you please clarify what GDC stands for?

@richgel999
Copy link
Owner

So the devel version now supports LZHAM_ERROR_LOGGING. Right now it only outputs to stderr (optionally), but this could be changed to call a callback (for example). I went through the entire codec and marked up every place an error can occur, to make it easier to track down what went wrong internally. I know this isn't perfect but it's a start.

GDC is the Games Developers Conference, next months.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants