[gnome-games] swell-foop: Handle history load failures



commit c14883e1b5cf5d8272a1eb02d8afaf8713fc6fcb
Author: Robert Ancell <robert ancell canonical com>
Date:   Thu Sep 27 12:08:00 2012 +1200

    swell-foop: Handle history load failures

 swell-foop/src/history.vala |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/swell-foop/src/history.vala b/swell-foop/src/history.vala
index 2f317d0..adb0666 100644
--- a/swell-foop/src/history.vala
+++ b/swell-foop/src/history.vala
@@ -28,6 +28,9 @@ public class History
         }
         catch (FileError e)
         {
+            if (!(e is FileError.NOENT))
+                warning ("Failed to load history: %s", e.message);
+            return;
         }
 
         foreach (var line in contents.split ("\n"))



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