org.fife.rtext
Class AWTExceptionHandler

java.lang.Object
  extended by org.fife.rtext.AWTExceptionHandler

public class AWTExceptionHandler
extends java.lang.Object

Catches uncaught exceptions thrown in the EDT. This is "magic" that works in at least 1.4 - 1.6 in Sun JVMs. We cannot simply use Thread.UncaughtExceptionHandler, since it didn't exist in 1.4 (and it doesn't work for exceptions thrown while modal dialogs are visible on the EDT anyway).

To use this class, call AWTExceptionHandler.register().

Version:
1.0
Author:
Robert Futrell

Constructor Summary
AWTExceptionHandler()
           
 
Method Summary
 void handle(java.lang.Throwable t)
          Callback for whenever an uncaught Throwable is thrown on the EDT.
static void register()
          Call this method to register this exception handler with the EDT.
static void shutdown()
          Cleans up this exception handler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AWTExceptionHandler

public AWTExceptionHandler()
Method Detail

handle

public void handle(java.lang.Throwable t)
Callback for whenever an uncaught Throwable is thrown on the EDT.

Parameters:
t - the uncaught Throwable.

register

public static void register()
Call this method to register this exception handler with the EDT.


shutdown

public static void shutdown()
Cleans up this exception handler. This should be called when the application shuts down.