[gnome-characters/wip/dueno/emoji: 2/5] js: Print error messages correctly



commit 9fe381f71185620f5b4d125e241198157b05454e
Author: Daiki Ueno <dueno src gnome org>
Date:   Fri Aug 18 10:19:24 2017 +0200

    js: Print error messages correctly

 src/categoryList.js   |    2 +-
 src/character.js      |    2 +-
 src/characterList.js  |    2 +-
 src/searchProvider.js |    4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/categoryList.js b/src/categoryList.js
index 3325dc6..fbb5833 100644
--- a/src/categoryList.js
+++ b/src/categoryList.js
@@ -149,7 +149,7 @@ var CategoryListWidget = new Lang.Class({
                 }
             }
         } catch (e) {
-            log("Failed to list engines: " + e);
+            log("Failed to list engines: " + e.message);
         }
         this._finishBuildScriptList(sources);
     },
diff --git a/src/character.js b/src/character.js
index bd7b505..a7832d1 100644
--- a/src/character.js
+++ b/src/character.js
@@ -153,7 +153,7 @@ var CharacterDialog = new Lang.Class({
                     let result = context.search_finish(res);
                     this._finishSearch(result);
                 } catch (e) {
-                    log("Failed to search related: " + e);
+                    log("Failed to search related: " + e.message);
                 }
             }));
 
diff --git a/src/characterList.js b/src/characterList.js
index 0ec4c82..844b299 100644
--- a/src/characterList.js
+++ b/src/characterList.js
@@ -551,7 +551,7 @@ var CharacterListView = new Lang.Class({
                     let result = context.search_finish(res);
                     this._addSearchResult(result);
                 } catch (e) {
-                    log("Failed to search: " + e);
+                    log("Failed to search: " + e.message);
                 }
             }));
     },
diff --git a/src/searchProvider.js b/src/searchProvider.js
index 29d671a..cbbff85 100644
--- a/src/searchProvider.js
+++ b/src/searchProvider.js
@@ -65,7 +65,7 @@ const SearchProvider = new Lang.Class({
                         characters.push(Gc.search_result_get(result, index));
                     }
                 } catch (e) {
-                    log("Failed to search by keywords: " + e);
+                    log("Failed to search by keywords: " + e.message);
                 }
                 invocation.return_value(new GLib.Variant('(as)', [characters]));
 
@@ -147,7 +147,7 @@ const SearchProvider = new Lang.Class({
                                   try {
                                       connection.call_finish(result);
                                   } catch(e) {
-                                      log('Failed to launch application: ' + e);
+                                      log('Failed to launch application: ' + e.message);
                                   }
 
                                   this._app.release();


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