mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-30 20:33:08 +02:00
[girepository] Include path to file in typelib load failure error
This makes version conflicts more obvious.
This commit is contained in:
parent
c8fb0f97a8
commit
c0b26bf0a0
@ -1224,9 +1224,19 @@ g_irepository_require (GIRepository *repository,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
typelib = g_typelib_new_from_mapped_file (mfile, error);
|
{
|
||||||
if (!typelib)
|
GError *temp_error = NULL;
|
||||||
goto out;
|
typelib = g_typelib_new_from_mapped_file (mfile, &temp_error);
|
||||||
|
if (!typelib)
|
||||||
|
{
|
||||||
|
g_set_error (error, G_IREPOSITORY_ERROR,
|
||||||
|
G_IREPOSITORY_ERROR_TYPELIB_NOT_FOUND,
|
||||||
|
"Failed to load typelib file '%s' for namespace '%s': %s",
|
||||||
|
path, namespace, temp_error->message);
|
||||||
|
g_clear_error (&temp_error);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
}
|
||||||
header = (Header *) typelib->data;
|
header = (Header *) typelib->data;
|
||||||
typelib_namespace = g_typelib_get_string (typelib, header->namespace);
|
typelib_namespace = g_typelib_get_string (typelib, header->namespace);
|
||||||
typelib_version = g_typelib_get_string (typelib, header->nsversion);
|
typelib_version = g_typelib_get_string (typelib, header->nsversion);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user