iconGrid: Actually throw programmer errors
This way we get a backtrace.
This commit is contained in:
parent
af06b78605
commit
17421e8a63
@ -423,10 +423,8 @@ const IconGrid = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
addItem: function(item, index) {
|
addItem: function(item, index) {
|
||||||
if (!item.icon || !item.icon instanceof BaseIcon) {
|
if (!item.icon instanceof BaseIcon)
|
||||||
log('Only items with a BaseIcon icon property can be added to IconGrid');
|
throw new Error('Only items with a BaseIcon icon property can be added to IconGrid');
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this._items.push(item);
|
this._items.push(item);
|
||||||
if (index !== undefined)
|
if (index !== undefined)
|
||||||
|
Loading…
Reference in New Issue
Block a user