Re: About gsettings aborting on unkown schemas



On Fri, 2011-05-27 at 15:34 +0100, Emmanuele Bassi wrote:
> On 2011-05-27 at 14:59, ecyrbe wrote:
> > > and then what? abort the application? gracefully terminate with a
> > > warning on the console?
> > >
> > 
> > 
> > No, you can gracefully show a popup to the user that something is broken and
> > to the right direction. It's better than crashing.
> 
> and what would a popup solve from the user's perspective? a missing
> schema is a missing file, which means an installation problem. there is
> *no* graceful way to handle that.

If the application itself is missing files it needs (schemas,
ui files, .la files, whatever), then yeah. If it's some plugin
that's busted, this is how I'd write my application code in a
language with real exception handling:

try:
    load_some_extension()
except:
    warn("This extension sucks. I'm disabling it and moving on.")

Of course, GLib is C. We don't have exceptions. We have GError,
which is a decent foundation for exceptions in language bindings.
But if we don't use it, then languages that could otherwise do
the right thing are screwed.

--
Shaun




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