#54 Regression on error code return, API issue or undocumented improper use?



While porting an application from gif_lib v4 to v5, I noticed a change that I think should be at least documented, and optionally considered for the next API change:

In v4, there were some functions that would return GIF_ERROR (DGifGetExtension, DGifGetLine, ...). As the doc did not state anything about it, it was supposed that calling GifLastError would get more info about the problem.

In v5, the function GifLastError have been removed, but the mentioned function still return only GIF_ERROR, so it is not possible to know more about the problem. Is that the expected behaviour?

Should doc of v4 include a little statement that GifLastError is of no use in these case?
Should API of v5 be updated to have the return value being the actual detailed error code?


  • Eric S. Raymond

    Eric S. Raymond - 2014-03-24

    From the documentation:

    Most of the routines return GIF_ERROR (see gif_lib.h) if something
    went wrong, GIF_OK otherwise. After an error return, all routines that
    take a pointer-to-GifFileType argument set the Error member with a code that
    can be interpreted into an expolanatory string with the function
    GifErrorString() in gif_err.c.

  • Eric S. Raymond

    Eric S. Raymond - 2014-03-24
    • status: open --> closed

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks