Catch all uncaught exceptions

Hi,Could I set a system handler to catch all uncaught exceptions to show them in a message dialog?Thnaks!
[140 byte] By [gtrhk] at [2007-9-30 8:30:49]
# 1

UncaughtExceptions are sent to the ThreadGroup.uncaughtException(Thread, Throwable) method. You can override this method for new Threads and catch all uncaught exception that way.

For the main thread you can just add in the main()

try {

// some code.

} catch (Throwable everything) {

everything.printStackTrace(System.err);

}

Peter-Lawrey at 2007-7-2 19:13:38 > top of Java-index,Administration Tools,Sun Connection...