Community
Participate
Working Groups
EG (11.09.2001 16:02:57) JavaUIException has to eliminated. it is currently used as follows: if (!status.isOK()) { Throwable t= new JavaUIException(status); ExceptionHandler.handle(t, activeShell, ReorgMessages.getString("moveAction.error.title"), ReorgMessages.getString("moveAction.error.message")); //$NON-NLS-1$ //$NON-NLS-2$ } else { either ExceptionHandler can take an IStatus directly or the error message is inlined. NOTES:
I think we should keep the JavaUIException since it gives use the possibility to distinguish between Core, JavaCore and JavaUI exceptions (we shouldn't through an core exception if it is aUI thing). Regarding the use of the exception to pass a status to the exception handler. In this cases the client should use the ErrorDialog directly (see ErrorDialog.openError(shell, title, message, status)); Moving to Adam to clean up wrong uses of JavaUIException.
Keeping it is fine but then we should make the corresponding status class conform to the platform conventions. It is currently called JavaUIErrorStatus it should be called JavaUIStatus. It should support to pass in a code (see the VCMException as an example). We should also introduce status constants in an IJavaUIStatus interface.
fixed (the constants are defined in JavaStatusConstants class)