| Summary: | TaskWizard#performFinish error handling assumes any exception is an error | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP ServerTools | Reporter: | Troy Bishop <tjbishop> | ||||
| Component: | wst.server | Assignee: | Angel Vera <arvera> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Angel Vera <arvera> | ||||
| Severity: | trivial | ||||||
| Priority: | P2 | ||||||
| Version: | 3.0.5 | ||||||
| Target Milestone: | 3.2.2 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| See Also: | https://git.eclipse.org/r/108984 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 166976 [details]
possible patch.
changes committed to 32M Changes committed and released to 32M and HEAD(3.3) Fixed. New Gerrit change created: https://git.eclipse.org/r/108984 |
Build Identifier: 3.0.5 patches The following code within org.eclipse.wst.server.ui.internal.wizard.TaskWizard#performFinish() assumes that any Exception that is thrown by the run() call is an error: Throwable t = null; try { if (getContainer() != null) getContainer().run(true, true, new WorkspaceRunnableAdapter(runnable)); else runnable.run(new NullProgressMonitor()); return true; } catch (InvocationTargetException te) { Trace.trace(Trace.SEVERE, "Error finishing task wizard", te); t = te.getCause(); } catch (Exception e) { Trace.trace(Trace.SEVERE, "Error finishing task wizard 2", e); t = e; } If the Exception that is thrown is a java.lang.InterruptedException than a message is logged to the workspace .log file saying "Error finishing task wizard 2". This is not correct as the logic that was executed was canceled so there was no error and no entry should exist in the .log file, like the following: !MESSAGE Error finishing task wizard 2 !STACK 0 java.lang.InterruptedException at org.eclipse.jface.operation.ModalContext.run(Unknown Source) at org.eclipse.jface.wizard.WizardDialog.run(Unknown Source) at org.eclipse.wst.server.ui.internal.wizard.TaskWizard.performFinish(Unknown Source) at org.eclipse.jface.wizard.WizardDialog.finishPressed(Unknown Source) at org.eclipse.jface.wizard.WizardDialog.buttonPressed(Unknown Source) at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Unknown Source) at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source) at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source) at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source) at org.eclipse.jface.window.Window.runEventLoop(Unknown Source) at org.eclipse.jface.window.Window.open(Unknown Source) at org.eclipse.wst.server.ui.internal.view.servers.ModuleSloshAction.perform(Unknown Source) ... Reproducible: Always