diff --git a/content/handlers/image/nssprite.c b/content/handlers/image/nssprite.c index f149350fd..c9fe1b585 100644 --- a/content/handlers/image/nssprite.c +++ b/content/handlers/image/nssprite.c @@ -165,7 +165,7 @@ ro_sprite_error: if (ctx != NULL) { rosprite_destroy_mem_context(ctx); } - content_broadcast_errorcode(c, NSERROR_UNKNOWN); + content_broadcast_errorcode(c, NSERROR_SPRITE_ERROR); return false; } diff --git a/utils/errors.h b/utils/errors.h index ad8ae429a..9a0a9bc04 100644 --- a/utils/errors.h +++ b/utils/errors.h @@ -40,6 +40,7 @@ typedef enum { NSERROR_GIF_ERROR, /**< A GIF error occurred */ NSERROR_ICO_ERROR, /**< A ICO error occurred */ NSERROR_PNG_ERROR, /**< A PNG error occurred */ + NSERROR_SPRITE_ERROR, /**< A RISC OS Sprite error occurred */ NSERROR_SVG_ERROR, /**< A SVG error occurred */ NSERROR_BAD_ENCODING, /**< The character set is unknown */ NSERROR_NEED_DATA, /**< More data needed */ diff --git a/utils/messages.c b/utils/messages.c index 0ff90b708..5f9420443 100644 --- a/utils/messages.c +++ b/utils/messages.c @@ -370,6 +370,10 @@ const char *messages_get_errorcode(nserror code) /* A PNG error occurred */ return messages_get_ctx("PNGError", messages_hash); + case NSERROR_SPRITE_ERROR: + /* A SVG error occurred */ + return messages_get_ctx("SpriteError", messages_hash); + case NSERROR_SVG_ERROR: /* A SVG error occurred */ return messages_get_ctx("SVGError", messages_hash);