diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2015-04-22 13:17:25 +0200 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2015-06-05 19:20:25 +0200 |
commit | 847b5fd8d202e526c9d9599d5671808e9316aab7 (patch) | |
tree | a558a39962ac6cfb16e38cd91ca52a4c722479bb /install | |
parent | cd5fe9b4079c848667b1e7c41b2f5d6ab173ee5f (diff) | |
download | freeipa-847b5fd8d202e526c9d9599d5671808e9316aab7.tar.gz freeipa-847b5fd8d202e526c9d9599d5671808e9316aab7.tar.xz freeipa-847b5fd8d202e526c9d9599d5671808e9316aab7.zip |
webui: better error reporting
- ActionDropdownWidget - report error if required action is missing
- report build errors to console
Reviewed-By: Martin Basti <mbasti@redhat.com>
Diffstat (limited to 'install')
4 files changed, 11 insertions, 1 deletions
diff --git a/install/ui/src/freeipa/Application_controller.js b/install/ui/src/freeipa/Application_controller.js index dc76fea59..ca08770fe 100644 --- a/install/ui/src/freeipa/Application_controller.js +++ b/install/ui/src/freeipa/Application_controller.js @@ -262,7 +262,6 @@ define([ if (error.results) { var msg = error.results.message; var stack = error.results.stack.toString(); - window.console.error(msg); window.console.error(stack); details.append('<h3>Technical details:</h3>'); details.append($('<div/>', { text: error.results.message })); diff --git a/install/ui/src/freeipa/_base/Builder.js b/install/ui/src/freeipa/_base/Builder.js index 029f8947f..05ff2dd6e 100644 --- a/install/ui/src/freeipa/_base/Builder.js +++ b/install/ui/src/freeipa/_base/Builder.js @@ -356,6 +356,7 @@ define(['dojo/_base/declare', // object is not to be built obj = null; } else { + window.console.error(e.stack); throw e; } } diff --git a/install/ui/src/freeipa/_base/Singleton_registry.js b/install/ui/src/freeipa/_base/Singleton_registry.js index 0c89e65bf..18b0c420a 100644 --- a/install/ui/src/freeipa/_base/Singleton_registry.js +++ b/install/ui/src/freeipa/_base/Singleton_registry.js @@ -69,6 +69,10 @@ define(['dojo/_base/declare', obj = this._map[type] = this.builder.build(type); } catch (e) { if (e.code === 'no-ctor-fac') obj = null; + else { + window.console.error('Error while building: ' + type); + throw e; + } } } diff --git a/install/ui/src/freeipa/widgets/ActionDropdownWidget.js b/install/ui/src/freeipa/widgets/ActionDropdownWidget.js index c43c79b54..2ddcff64b 100644 --- a/install/ui/src/freeipa/widgets/ActionDropdownWidget.js +++ b/install/ui/src/freeipa/widgets/ActionDropdownWidget.js @@ -74,6 +74,12 @@ define(['dojo/_base/declare', for (i=0; i<this.action_names.length; i++) { name = this.action_names[i]; action = this.facet.actions.get(name); + if (!action) { + window.console.error( + "ActionDropDown: cannot find action: " + name + + "\nFacet: "+facet.name); + continue; + } this.add_action(action, true); } this.recreate_options(); |