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

Signal errors with return codes? #239

Open
ryan-williams opened this issue Sep 11, 2018 · 3 comments
Open

Signal errors with return codes? #239

ryan-williams opened this issue Sep 11, 2018 · 3 comments

Comments

@ryan-williams
Copy link

While decompressing via JBlosc, I was hitting a -1 return value from because my "dest" buffer wasn't big enough.

I'm responding to all -1s by exponentially increasing my buffer size until I hit 2GB-1, at which point I assume continued failure means the data is corrupt, but it would be nice to differentiate these cases via the return value.

@FrancescAlted
Copy link
Member

Yes, I'm +1 on this, although the error codes would need a more complete overhauling in general. Help in this area is welcome.

@ryan-williams
Copy link
Author

Cool, I was kind of imagining that this would be considered a "breaking change" and not really feasible, but I if there were explicitly no guarantees about return codes previously, other than e.g. "negative means error", then it's not a big deal?

Would the process basically be to replace every return -1 with a unique integer, and document it?

@FrancescAlted
Copy link
Member

Yeah, there are currently no guarantees with that, and yes, a return -integer and documenting it would essentially be it. Thanks for tackling this.

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