Alexander Wels has posted comments on this change.
Change subject: userportal,webadmin: Frontend refactor
......................................................................
Patch Set 6: (2 inline comments)
....................................................
File
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/Frontend.java
Line 386: (ArrayList<VdcQueryParametersBase>) queryParamsList,
Line 387: new AsyncCallback<ArrayList<VdcQueryReturnValue>>() {
Line 388: @Override
Line 389: public void onFailure(final Throwable caught) {
Line 390: try {
Yes there are many different ways of making sure that raiseQueryCompleteEvent
is called. My way guarantees it gets called regardless of returns, exceptions,
etc.
Line 391: if (ignoreFailure(caught)) {
Line 392: return;
Line 393: }
Line 394: logger.log(Level.SEVERE, "Failed to execute
RunPublicQuery: " + caught, caught); //$NON-NLS-1$
....................................................
File
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/uicommon/FrontendEventsHandlerImpl.java
Line 48
Line 49
Line 50
Line 51
Line 52
runMultipleActionFailed is called from one single location, namely 'onSuccess'
in RunMultipleAction. Which is exactly the case you are talking about. One or
more of the actions could have failed. This is the code that leads up to
runMultipleActions being called:
ArrayList<VdcReturnValueBase> failed = new ArrayList<VdcReturnValueBase>();
ArrayList<VdcFault> faults = new ArrayList<VdcFault>();
for (VdcReturnValueBase v : result) {
if (!v.getCanDoAction()) {
failed.add(v);
}
}
if (!failed.isEmpty()) {
translateErrors(failed);
getEventsHandler().runMultipleActionFailed(actionType, failed, faults);
}
As you can see faults is an empty array list, that does not get touched, passed
or anything except to runMultipleActionFailed, where it gets looped and then
discarded. So NOTHING happens with it.
failed on the other hand seems to be the list that contains the error messages.
Just not faults.
--
To view, visit http://gerrit.ovirt.org/15399
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I3dae5a455ad16660b97cddafba53b53d3b4196f1
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alexander Wels <[email protected]>
Gerrit-Reviewer: Alexander Wels <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Einav Cohen <[email protected]>
Gerrit-Reviewer: Greg Sheremeta <[email protected]>
Gerrit-Reviewer: Vojtech Szocs <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches