mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 23:16:14 +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;
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user