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 655211 - Fix some error domains in GFile bindings
Fix some error domains in GFile bindings
Status: RESOLVED NOTABUG
Product: vala
Classification: Core
Component: Bindings: GLib
0.13.x
Other All
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks: 650414
 
 
Reported: 2011-07-24 15:58 UTC by Philip Withnall
Modified: 2011-07-25 19:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix some error domains in the GFile bindings (3.60 KB, patch)
2011-07-24 15:59 UTC, Philip Withnall
none Details | Review

Description Philip Withnall 2011-07-24 15:58:00 UTC
Patch coming up to fix some error domains for the GFile bindings. I hope I've
done this the correct way.
Comment 1 Philip Withnall 2011-07-24 15:59:34 UTC
Created attachment 192561 [details] [review]
Fix some error domains in the GFile bindings
Comment 2 Evan Nemerson 2011-07-25 18:56:46 UTC
The problem is that the API is not guaranteed to only use GIOError. I spoke with Ryan Lortie in August of 2010 about this issue (error domains in GIO, not specifically GFiile), and he isn't making any promises about which error domains will be used. According to him, "many things there (and increasingly so) will be throwing errors related to DBus, for example".

It seems the only thing to do is keep the errors as GError. You can still catch the error in your code and test if it is a GLib.IOError.
Comment 3 Philip Withnall 2011-07-25 19:22:33 UTC
Ah, right. That makes sense.