Maybe just check for file existence?
Am Sonntag, den 16.12.2012, 21:59 +0100 schrieb rastersoft: > Hi all: > > I'm working with GSettings. I want to read org.gnome.desktop.background > and want to ensure that my code works even when the schema is not > installed (let's say, if the user is using KDE). > > When I try to access an inexistent schema, I receive this message: > > (cronopete:15673): GLib-GIO-ERROR **: Settings schema > 'org.gnome54.desktop.background' is not installed > > Trace/breakpoint trap (core dumped) > > I tried to catch it with try/catch, but I'm unable: always got the core > dumped and the code ends. > > I'm considering to read all the installed schemas and ensure that the > one I want is installed before creating the gsettings, but I'm sure > there must be a more elegant way of doing it. The question is: how? > > Thanks! > > _______________________________________________ > vala-list mailing list > [email protected] > https://mail.gnome.org/mailman/listinfo/vala-list _______________________________________________ vala-list mailing list [email protected] https://mail.gnome.org/mailman/listinfo/vala-list
