mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-27 16:51:06 -07:00
Improve gif_load error messages
* src/image.c (gif_load): Improve error reporting (bug#54848).
This commit is contained in:
parent
7d5d0abd2d
commit
11080420dd
1 changed files with 14 additions and 3 deletions
17
src/image.c
17
src/image.c
|
|
@ -8754,10 +8754,21 @@ gif_load (struct frame *f, struct image *img)
|
|||
rc = DGifSlurp (gif);
|
||||
if (rc == GIF_ERROR || gif->ImageCount <= 0)
|
||||
{
|
||||
if (NILP (specified_data))
|
||||
image_error ("Error reading `%s'", img->spec);
|
||||
#if HAVE_GIFERRORSTRING
|
||||
const char *errstr = GifErrorString (gif->Error);
|
||||
if (errstr)
|
||||
if (NILP (specified_data))
|
||||
image_error ("Error reading `%s' (%s)", img->spec,
|
||||
build_string (errstr));
|
||||
else
|
||||
image_error ("Error reading GIF data: %s",
|
||||
build_string (errstr));
|
||||
else
|
||||
image_error ("Error reading GIF data");
|
||||
#endif
|
||||
if (NILP (specified_data))
|
||||
image_error ("Error reading `%s'", img->spec);
|
||||
else
|
||||
image_error ("Error reading GIF data");
|
||||
goto gif_error;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue