[gnome-maps] placeStore: do not throw exception in store



commit fcf7d96d5c40b75fe1be1e5667b96290c2e1a23e
Author: Jonas Danielsson <jonas threetimestwo org>
Date:   Thu Jan 23 12:33:51 2014 +0100

    placeStore: do not throw exception in store
    
    https://bugzilla.gnome.org/show_bug.cgi?id=722825

 src/placeStore.js |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/src/placeStore.js b/src/placeStore.js
index ba11b45..0df236f 100644
--- a/src/placeStore.js
+++ b/src/placeStore.js
@@ -158,7 +158,7 @@ const PlaceStore = new Lang.Class({
 
         let buffer = JSON.stringify(jsonArray);
         if (!Utils.writeFile(this.filename, buffer))
-            throw new Error('failed to write file');
+            log('Failed to write places file!');
     },
 
     _addPlace: function(place, type, added) {
@@ -180,12 +180,7 @@ const PlaceStore = new Lang.Class({
             }).bind(this));
         }
         this._typeTable[place.name] = type;
-
-        try {
-            this._store();
-        } catch (e) {
-            Utils.debug(e);
-        }
+        this._store();
     },
 
     _exists: function(place, type) {


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