[gnome-documents] all: Use unique and meaningful debug messages



commit f59259b080a8f275139a898e385d369c191c3007
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Nov 25 18:37:09 2013 +0100

    all: Use unique and meaningful debug messages
    
    https://bugzilla.gnome.org/show_bug.cgi?id=711794

 src/selections.js          |   10 +++++-----
 src/shellSearchProvider.js |   14 +++++++-------
 2 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/src/selections.js b/src/selections.js
index 1c1a907..e5fbe44 100644
--- a/src/selections.js
+++ b/src/selections.js
@@ -65,7 +65,7 @@ const FetchCollectionsJob = new Lang.Class({
                     cursor = object.query_finish(res);
                     cursor.next_async(null, Lang.bind(this, this._onCursorNext));
                 } catch (e) {
-                    log(e);
+                    log('Unable to run FetchCollectionsJob: ' + e.message);
                     this._emitCallback();
                 }
             }));
@@ -77,7 +77,7 @@ const FetchCollectionsJob = new Lang.Class({
         try {
             valid = cursor.next_finish(res);
         } catch (e) {
-            log(e);
+            log('Unable to read results of FetchCollectionsJob: ' + e.message);
         }
 
         if (!valid) {
@@ -211,7 +211,7 @@ const UpdateMtimeJob = new Lang.Class({
                 try {
                     object.update_finish(res);
                 } catch (e) {
-                    log(e);
+                    log('Unable to run UpdateMtimeJob: ' + e.message);
                 }
 
                 if (this._callback)
@@ -249,7 +249,7 @@ const SetCollectionForSelectionJob = new Lang.Class({
                         try {
                             object.update_finish(res);
                         } catch (e) {
-                            log(e);
+                            log('Unable to run SetCollectionForSelectionJob: ' + e.message);
                         }
 
                         this._jobCollector();
@@ -291,7 +291,7 @@ const CreateCollectionJob = new Lang.Class({
                 try {
                     variant = object.update_blank_finish(res); // variant is aaa{ss}
                 } catch (e) {
-                    log(e);
+                    log('Unable to run CreateCollectionJob: ' + e.message);
                 }
 
                 variant = variant.get_child_value(0); // variant is now aa{ss}
diff --git a/src/shellSearchProvider.js b/src/shellSearchProvider.js
index 845ba0f..00505af 100644
--- a/src/shellSearchProvider.js
+++ b/src/shellSearchProvider.js
@@ -90,7 +90,7 @@ function _createThumbnailIcon(uri) {
         if (path)
             return new Gio.FileIcon({ file: Gio.file_new_for_path(path) });
     } catch(e) {
-        log(e);
+        log('Unable to create thumbnail icon: ' + e.message);
     }
     return null;
 }
@@ -149,7 +149,7 @@ const CreateCollectionIconJob = new Lang.Class({
                     cursor = object.query_finish(res);
                     cursor.next_async(null, Lang.bind(this, this._onCursorNext));
                 } catch (e) {
-                    log('Error querying tracker: ' + e);
+                    log('Unable to run CreateCollectionIconJob: ' + e.message);
                     this._hasItemIds();
                 }
             }));
@@ -171,7 +171,7 @@ const CreateCollectionIconJob = new Lang.Class({
             try {
                 pixbuf = info.load_icon();
             } catch(e) {
-                log("Unable to load pixbuf: " + e);
+                log("Unable to load pixbuf: " + e.message);
             }
         } else if (icon instanceof Gio.FileIcon) {
             try {
@@ -179,7 +179,7 @@ const CreateCollectionIconJob = new Lang.Class({
                 pixbuf = GdkPixbuf.Pixbuf.new_from_stream(stream,
                                                           null);
             } catch(e) {
-                log("Unable to load pixbuf: " + e);
+                log("Unable to load pixbuf: " + e.message);
             }
         }
 
@@ -193,7 +193,7 @@ const CreateCollectionIconJob = new Lang.Class({
             valid = cursor.next_finish(res);
         } catch (e) {
             cursor.close();
-            log('Error querying tracker: ' + e);
+            log('Unable to read results of CreateCollectionIconJob: ' + e.message);
 
             this._hasItemIds();
         }
@@ -329,7 +329,7 @@ const FetchIdsJob = new Lang.Class({
                     cursor = object.query_finish(res);
                     cursor.next_async(this._cancellable, Lang.bind(this, this._onCursorNext));
                 } catch (e) {
-                    log('Error querying tracker: ' + e);
+                    log('Unable to run FetchIdsJob: ' + e.message);
                     callback(this._ids);
                 }
             }));
@@ -342,7 +342,7 @@ const FetchIdsJob = new Lang.Class({
             valid = cursor.next_finish(res);
         } catch (e) {
             cursor.close();
-            log('Error querying tracker: ' + e);
+            log('Unable to read results of FetchIdsJob: ' + e.message);
 
             this._callback(this._ids);
         }


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