Warn on key file parse errors, rather than explode
authorPhilip Withnall <philip.withnall@collabora.co.uk>
Wed, 8 Sep 2010 10:10:49 +0000 (11:10 +0100)
committerPhilip Withnall <philip.withnall@collabora.co.uk>
Fri, 10 Sep 2010 11:22:29 +0000 (12:22 +0100)
Contrary to popular belief, it is possible to encounter errors when parsing
key files. In this case, the key-file backend shouldn't explode without a
helpful error message. Helps: bgo#628930

backends/key-file/kf-persona.vala

index 66432ab..372451c 100644 (file)
@@ -174,7 +174,7 @@ public class Folks.Backends.Kf.Persona : Folks.Persona,
            * get any other exceptions, since we're iterating through a list of
            * keys we've just retrieved. */
           if (!(e is KeyFileError.GROUP_NOT_FOUND))
-            GLib.assert_not_reached ();
+            warning ("Couldn't load data from key file: %s", e.message);
         }
     }