mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01: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:
parent
7aad93c5b4
commit
c48a0d8813
@ -29,7 +29,8 @@ subparser_start_element (GMarkupParseContext *context,
|
||||
|
||||
/* we don't like trouble... */
|
||||
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
|
||||
@ -88,7 +89,8 @@ subparser_end (GMarkupParseContext *ctx,
|
||||
if (result == NULL || result[0] == '\0')
|
||||
{
|
||||
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;
|
||||
}
|
||||
@ -160,7 +162,8 @@ replay_parser_end (GMarkupParseContext *ctx,
|
||||
if (result == NULL || result[0] == '\0')
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user