Alexander Wels has posted comments on this change.

Change subject: webadmin: Simplified failure handling code in Frontend
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.ovirt.org/#/c/27804/3/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/Frontend.java
File 
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/Frontend.java:

Line 912:         // 'runActionExecutionFailed' invokes an error pop-up 
displaying, therefore calling 'failureEventHandler' is
Line 913:         // only needed for canDoAction failure
Line 914:         if (failedOnCanDoAction && (getEventsHandler() != null)
Line 915:                 && 
(getEventsHandler().isRaiseErrorModalPanel(actionType, result.getFault()))) {
Line 916:             if (result.getCanDoActionMessages().isEmpty()) {
> The only case that has seemingly changed is that of a single canDoAction() 
I looked at the code for ErrorMessageFormatter, and that turns the single 
message into a list of message for formatting... So basically the old code does 
List->single string->List for formatting. I think it would be a good plan to 
simply remove the single string from FrontendFailureEventArgs, and always pass 
a list around, even if that list is a single message. Not sure why there was 
logic for a single message to start with.
Line 917:                 // TODO: Externalize to a better location, should 
support translation via
Line 918:                 // resource bundle file.
Line 919:                 failureEventHandler(result.getDescription(), "No 
Message"); //$NON-NLS-1$
Line 920:             } else {


-- 
To view, visit http://gerrit.ovirt.org/27804
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I19a0fc10841c9d400ad381f5f9f5fbaaf55fe871
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Lior Vernia <lver...@redhat.com>
Gerrit-Reviewer: Alexander Wels <aw...@redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com>
Gerrit-Reviewer: Lior Vernia <lver...@redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vsz...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to