Bug 39003 [JFace] Window exception handler
Hi all, The org.eclipse.jface.window.Window class contains the following sequence of code: public static void setExceptionHandler(IExceptionHandler handler) { if(exceptionHandler instanceof DefaultExceptionHandler) exceptionHandler = handler; } The instanceof check actually prevents setting a custom exception handler. The DefaultExceptionHandler class is made private and cannot be extended to hack around of this code. The DefaultExceptionHandler handles exceptions by printing stacktrace to the standard output. This problem effectively prevents the use of jface Window and it's subclass ApplicationWindow classes in any non trivial application. Regards, Peter.
bundles/org.eclipse.jface/src/org/eclipse/jface/window/Window.java
/*
		 * (non-Javadoc)
		 * 
		 * @see org.eclipse.jface.window.Window.IExceptionHandler#handleException(java.lang.Throwable)
		 */
		public void handleException(Throwable t) {
			if (t instanceof ThreadDeath) {
				
				
				throw (ThreadDeath) t;
			}
			
			t.printStackTrace();
		}
	}
	/**
	 * The exception handler for this application.
	 */
	private static IExceptionHandler exceptionHandler = new DefaultExceptionHandler();
	
	/**
	 * The default orientation of the window. By default
	 * it is SWT#NONE but it can also be SWT#LEFT_TO_RIGHT
	 * or SWT#RIGHT_TO_LEFT
	 */