Errorcodes: Add SPRITE_ERROR and use it in sprite content handler.

This commit is contained in:
Michael Drake 2017-08-30 09:43:13 +01:00
parent 1670dc33af
commit c2ac1a713f
3 changed files with 6 additions and 1 deletions

View File

@ -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;
}

View File

@ -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 */

View File

@ -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);