Re: About gsettings aborting on unkown schemas



On Fri, 2011-05-27 at 11:57 -0400, Matthias Clasen wrote:
> On Fri, May 27, 2011 at 7:42 AM, ecyrbe <ecyrbe gmail com> wrote:
> > I just filled this bug : https://bugzilla.gnome.org/show_bug.cgi?id=651225
> > Mathias closed it as wontfix, this is by "design".. i'm told that it's not a
> > bug it's a feature!
> >
> > So if my desktop is crashing it's a feature and nobody is willing to fix
> > it?I really would like to have another answer than this one.
> 
> The fix is to install the missing schema.

Sorry to pick on Matthias, by responding to his mail, but I think that
general-purpose thinking is preventing people from realizing that there
is a real problem that needs to be fixed here.

Yes, programs should not be written to run with missing schemas.
Yes, we don't have ways clean ways of "raising exceptions" for
programmer or system configuration errors.

But that doesn't change the fact that if from some interactive
environment (GNOME Shell "looking glass console", python command line,
etc), I try to use GSettings and typo the name of a schema, it should
not; _should not_ make the entire environment go boom.

So, let's add alternate API that allows for failure  without going boom
and blowing up the world, and let's figure out how to get that hooked
up to languages with exceptions automatically. Yes, this is made harder
by the fact that it's a constructor, not a normal function, but it's
certainly doable; we just have to come up with a convention.

(The idea that comes t mind is that we add a construct-only property
that means "construct in an error state", and and a getter to check
for and retrieve the GError.)

- Owen




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]