mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-18 14:48:53 +02:00
markup-subparser test: use a real GError domain
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Matthias Clasen <mclasen@redhat.com> Bug: https://bugzilla.gnome.org/show_bug.cgi?id=660371
This commit is contained in:
@@ -29,7 +29,8 @@ subparser_start_element (GMarkupParseContext *context,
|
|||||||
|
|
||||||
/* we don't like trouble... */
|
/* we don't like trouble... */
|
||||||
if (strcmp (element_name, "trouble") == 0)
|
if (strcmp (element_name, "trouble") == 0)
|
||||||
g_set_error (error, 0, 0, "we don't like trouble");
|
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
|
||||||
|
"we don't like trouble");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -88,7 +89,8 @@ subparser_end (GMarkupParseContext *ctx,
|
|||||||
if (result == NULL || result[0] == '\0')
|
if (result == NULL || result[0] == '\0')
|
||||||
{
|
{
|
||||||
g_free (result);
|
g_free (result);
|
||||||
g_set_error (error, 0, 0, "got no data");
|
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
|
||||||
|
"got no data");
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -160,7 +162,8 @@ replay_parser_end (GMarkupParseContext *ctx,
|
|||||||
if (result == NULL || result[0] == '\0')
|
if (result == NULL || result[0] == '\0')
|
||||||
{
|
{
|
||||||
g_free (result);
|
g_free (result);
|
||||||
g_set_error (error, 0, 0, "got no data");
|
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
|
||||||
|
"got no data");
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user