Bug 210946 [Workbench] Unproper error handling in class ModalContext
Build ID: M20070921-1145 Steps To Reproduce: A caught Throwable is not written to the Eclipse log. It is just written on the console. org.eclipse.jface.operation.ModalContext public void block() { if (display == Display.getCurrent()) { while (continueEventDispatching) { // Run the event loop. Handle any uncaught exceptions caused // by UI events. try { if (!display.readAndDispatch()) { display.sleep(); } } // ThreadDeath is a normal error when the thread is dying. We must // propagate it in order for it to properly terminate. catch (ThreadDeath e) { throw (e); } // For all other exceptions, log the problem. catch (Throwable e) { System.err.println("Unhandled event loop exception during blocked modal context."); //$NON-NLS-1$ e.printStackTrace(); } More information:
bundles/org.eclipse.jface/src/org/eclipse/jface/operation/ModalContext.java
}
	/**
	 * Sets whether ModalContext is running in debug mode.
	 * 
	 * @param debugMode
	 *            <code>true</code> for debug mode, and <code>false</code>
	 *            for normal mode (the default)
	 */
	public static void setDebugMode(boolean debugMode) {
		debug = debugMode;
	}
	/**
	 * Sets whether ModalContext may process events (by calling
	 * <code>Display.readAndDispatch()</code>) while running operations. By
	 * default, ModalContext will process events while running operations. Use
	 * this method to disallow event processing temporarily.
	 * 
	 * @param allowReadAndDispatch
	 *            <code>true</code> (the default) if events may be processed
	 *            while running an operation, <code>false</code> if
	 *            Display.readAndDispatch() should not be called from
	 *            ModalContext.
	 * @since 3.2
	 */
	public static void setAllowReadAndDispatch(boolean allowReadAndDispatch) {
		
		runInSeparateThread = allowReadAndDispatch;
	}
}