From: Michael Orlitzky Date: Sat, 5 Aug 2023 21:59:45 +0000 (-0400) Subject: io-svg.c: update libsvgtiny error descriptions. X-Git-Tag: 0.0.1~24 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=4b0f9dfd8a71a23e5c57b715945a9dccfb9ad6dc;p=libsvgtiny-pixbuf.git io-svg.c: update libsvgtiny error descriptions. The libsvgtiny README gives you some idea of what they mean. --- diff --git a/io-svg.c b/io-svg.c index b65d089..5f57689 100644 --- a/io-svg.c +++ b/io-svg.c @@ -124,9 +124,9 @@ static diagram_t* svgtiny_diagram_from_buffer(char* buffer, diagram = svgtiny_create(); if (!diagram) { g_set_error_literal(error, - GDK_PIXBUF_ERROR, - GDK_PIXBUF_ERROR_FAILED, - "svgtiny_create() failed"); + G_FILE_ERROR, + G_FILE_ERROR_NOMEM, + "out of memory in svgtiny_create()"); return NULL; } @@ -145,19 +145,19 @@ static diagram_t* svgtiny_diagram_from_buffer(char* buffer, g_set_error_literal(error, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_CORRUPT_IMAGE, - "libdom error in svgtiny_parse()"); + "invalid XML DOM in svgtiny_parse()"); break; case svgtiny_NOT_SVG: g_set_error_literal(error, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_CORRUPT_IMAGE, - "encountered svgtiny_NOT_SVG in svgtiny_parse()"); + "missing element in svgtiny_parse()"); break; case svgtiny_SVG_ERROR: g_set_error(error, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_CORRUPT_IMAGE, - "SVG error in svgtiny_parse() on line %i: %s", + "SVG format error in svgtiny_parse() on line %i: %s", diagram->error_line, diagram->error_message); break;