[gnome-shell] iconGrid: Actually throw programmer errors



commit 17421e8a6332daa5121763d0ffee025061c9f0bc
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Oct 30 13:05:20 2013 -0400

    iconGrid: Actually throw programmer errors
    
    This way we get a backtrace.

 js/ui/iconGrid.js |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js
index 4801ac2..64a5442 100644
--- a/js/ui/iconGrid.js
+++ b/js/ui/iconGrid.js
@@ -423,10 +423,8 @@ const IconGrid = new Lang.Class({
     },
 
     addItem: function(item, index) {
-        if (!item.icon || !item.icon instanceof BaseIcon) {
-            log('Only items with a BaseIcon icon property can be added to IconGrid');
-            return;
-        }
+        if (!item.icon instanceof BaseIcon)
+            throw new Error('Only items with a BaseIcon icon property can be added to IconGrid');
 
         this._items.push(item);
         if (index !== undefined)


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