After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 754012 - missing filename in "Error loading css: Failed to import: Error opening file: No such file or directory"
missing filename in "Error loading css: Failed to import: Error opening file:...
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2015-08-24 07:11 UTC by Stefan Sauer (gstreamer, gtkdoc dev)
Modified: 2016-07-17 03:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Improve error reporting (13.57 KB, patch)
2015-08-26 15:08 UTC, Matthias Clasen
committed Details | Review

Description Stefan Sauer (gstreamer, gtkdoc dev) 2015-08-24 07:11:38 UTC
From my unit tests I've got a few errors that lack an obvious detail - the filename:
"Error loading css: Failed to import: Error opening file: No such file or directory"

This is where the error is produced:
https://git.gnome.org/browse/gtk+/tree/gtk/gtkcssprovider.c#n2716

I can make a patch to include g_file_get_path(file) here or should g_file_load_contents() already do that? WDYT?
Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2015-08-24 07:14:45 UTC
For glib it would need to be done in the vmethods for g_file_read():
https://git.gnome.org/browse/glib/tree/gio/gfile.c#n1565
Comment 2 Matthias Clasen 2015-08-26 15:08:23 UTC
Created attachment 310038 [details] [review]
Improve error reporting

Include the filename for the file in question in many of the
error messages in glocalfile.c. This is useful information when
diagnosing such errors, so make it easily available.

http://bugzilla.gnome.org/show_bug.cgi?id=754012
Comment 3 Stefan Sauer (gstreamer, gtkdoc dev) 2015-08-26 18:48:55 UTC
Thanks, that looks perfect!
Comment 4 Matthias Clasen 2016-07-17 03:10:36 UTC
Attachment 310038 [details] pushed as 21ceeed - Improve error reporting