diff options
Diffstat (limited to 'install/ui/ipa.js')
-rw-r--r-- | install/ui/ipa.js | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/install/ui/ipa.js b/install/ui/ipa.js index a6c9694cb..2f1c6969c 100644 --- a/install/ui/ipa.js +++ b/install/ui/ipa.js @@ -131,17 +131,29 @@ var IPA = ( function () { return that.entities.values; }; + + that.get_entity = function(name) { var entity = that.entities.get(name); if (!entity){ var factory = that.entity_factories[name]; + if (!factory){ + return null; + } try { entity = factory(); that.add_entity(entity); - entity.init(); } catch (e) { - /*exceptions thrown by builder just mean that entities - are not to be registered. */ + if (e.expected){ + /*expected exceptions thrown by builder just mean that + entities are not to be registered. */ + return null; + } + if (e.message){ + alert(e.message); + }else{ + alert(e); + } return null; } } @@ -597,4 +609,4 @@ IPA.dirty_dialog = function(spec) { }; return that; -};
\ No newline at end of file +}; |