Signal errors with return codes?
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.
Yes, I'm +1 on this, although the error codes would need a more complete overhauling in general. Help in this area is welcome.
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?
Yeah, there are currently no guarantees with that, and yes, a return -integer and documenting it would essentially be it. Thanks for tackling this.