glib-compile-schemas: Show error positions

GMarkup provides this information, pass it on.
This commit is contained in:
Matthias Clasen 2015-05-15 22:41:29 -04:00
parent d853ceddb5
commit aecac6e1cb

View File

@ -1745,6 +1745,7 @@ parse_gschema_files (gchar **files,
GMarkupParseContext *context;
gchar *contents;
gsize size;
gint line, col;
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);
/* 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);
if (strict)