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 777135 - gkeyfile: Be more specific about error codes in documentation
gkeyfile: Be more specific about error codes in documentation
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: docs
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2017-01-11 14:02 UTC by Philip Withnall
Modified: 2017-02-05 14:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gkeyfile: Be more specific about error codes in documentation (2.08 KB, patch)
2017-01-11 14:02 UTC, Philip Withnall
none Details | Review
gkeyfile: Be more specific about error codes in documentation (2.21 KB, patch)
2017-01-11 17:24 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2017-01-11 14:02:52 UTC
Trivial patch attached.
Comment 1 Philip Withnall 2017-01-11 14:02:56 UTC
Created attachment 343304 [details] [review]
gkeyfile: Be more specific about error codes in documentation

It’s hard to know whether trying to load a non-existent key file will
result in G_KEY_FILE_ERROR_NOT_FOUND or G_FILE_ERROR_NOENT; try to
improve the documentation to clarify that.
Comment 2 Allison Karlitskaya (desrt) 2017-01-11 14:14:36 UTC
Review of attachment 343304 [details] [review]:

Your patch is already an improvement over the status quo, so thanks for that.  I think it may be better to state it like so, however:

1) (only for the search function) Failure to find a file in any search path gives you G_KEY_FILE_ERROR_NOT_FOUND
2) OS errors when trying to open or read the given/found file give you GFileError
3) errors when trying to parse the content give you GKeyFileError

It may also be worth specifically mentioning in the load_from_file() case that G_KEY_FILE_ERROR_NOT_FOUND is never returned.
Comment 3 Philip Withnall 2017-01-11 17:24:54 UTC
Created attachment 343319 [details] [review]
gkeyfile: Be more specific about error codes in documentation

It’s hard to know whether trying to load a non-existent key file will
result in G_KEY_FILE_ERROR_NOT_FOUND or G_FILE_ERROR_NOENT; try to
improve the documentation to clarify that.
Comment 4 Philip Withnall 2017-02-05 14:03:19 UTC
Review of attachment 343319 [details] [review]:

Allison says this is OK.
Comment 5 Philip Withnall 2017-02-05 14:04:32 UTC
Attachment 343319 [details] pushed as edc68f2 - gkeyfile: Be more specific about error codes in documentation