mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 07:56:17 +01:00
glib-compile-schemas: Show error positions
GMarkup provides this information, pass it on.
This commit is contained in:
parent
d853ceddb5
commit
aecac6e1cb
@ -1745,6 +1745,7 @@ parse_gschema_files (gchar **files,
|
|||||||
GMarkupParseContext *context;
|
GMarkupParseContext *context;
|
||||||
gchar *contents;
|
gchar *contents;
|
||||||
gsize size;
|
gsize size;
|
||||||
|
gint line, col;
|
||||||
|
|
||||||
if (!g_file_get_contents (filename, &contents, &size, &error))
|
if (!g_file_get_contents (filename, &contents, &size, &error))
|
||||||
{
|
{
|
||||||
@ -1776,7 +1777,8 @@ parse_gschema_files (gchar **files,
|
|||||||
g_hash_table_remove (state.enum_table, item->data);
|
g_hash_table_remove (state.enum_table, item->data);
|
||||||
|
|
||||||
/* let them know */
|
/* let them know */
|
||||||
fprintf (stderr, "%s: %s. ", filename, error->message);
|
g_markup_parse_context_get_position (context, &line, &col);
|
||||||
|
fprintf (stderr, "%s:%d:%d %s. ", filename, line, col, error->message);
|
||||||
g_clear_error (&error);
|
g_clear_error (&error);
|
||||||
|
|
||||||
if (strict)
|
if (strict)
|
||||||
|
Loading…
Reference in New Issue
Block a user