Correctly handle the situation when a GConf key can't be found http://bugzilla.gnome.org/show_bug.cgi?id=169059 Index: beagled/GConfThreadHelper.cs =================================================================== RCS file: /cvs/gnome/beagle/beagled/GConfThreadHelper.cs,v retrieving revision 1.1 diff -u -B -p -r1.1 GConfThreadHelper.cs --- beagled/GConfThreadHelper.cs 12 Mar 2005 05:33:18 -0000 1.1 +++ beagled/GConfThreadHelper.cs 17 Mar 2005 12:03:12 -0000 @@ -38,6 +38,7 @@ namespace Beagle.Daemon { private string path; private object data; private bool finished; + private Exception ex; private GConfThreadHelper (string path) { @@ -51,7 +52,12 @@ namespace Beagle.Daemon { if (gconf_client == null) gconf_client = new GConf.Client (); - this.data = gconf_client.Get (this.path); + try { + this.data = gconf_client.Get (this.path); + } catch (Exception ex) { + this.ex = ex; + } + this.finished = true; Monitor.Pulse (lock_obj); } @@ -71,6 +77,9 @@ namespace Beagle.Daemon { while (! helper.finished && ! Shutdown.ShutdownRequested) Monitor.Wait (lock_obj, one_second); + + if (helper.ex != null) + throw helper.ex; return helper.data; } Index: beagled/EvolutionMailDriver/EvolutionMailIndexableGenerator.cs =================================================================== RCS file: /cvs/gnome/beagle/beagled/EvolutionMailDriver/EvolutionMailIndexableGenerator.cs,v retrieving revision 1.26 diff -u -B -p -r1.26 EvolutionMailIndexableGenerator.cs --- beagled/EvolutionMailDriver/EvolutionMailIndexableGenerator.cs 16 Mar 2005 02:40:01 -0000 1.26 +++ beagled/EvolutionMailDriver/EvolutionMailIndexableGenerator.cs 17 Mar 2005 12:03:13 -0000 @@ -520,7 +520,8 @@ namespace Beagle.Daemon.EvolutionMailDri try { this.accounts = (ICollection) GConfThreadHelper.Get ("/apps/evolution/mail/accounts"); - } catch (GConf.NoSuchKeyException) { + } catch (Exception ex) { + EvolutionMailQueryable.log.Warn ("Caught exception in Setup(): " + ex.Message); EvolutionMailQueryable.log.Warn ("There are no configured evolution accounts, ignoring {0}", this.imap_name); return false; }