SRJRCFrames
v0.1.296

de.schwarzrot.app.errors.support
Class AwtExceptionHandlerAdapterHack

java.lang.Object
  extended by de.schwarzrot.app.errors.support.AwtExceptionHandlerAdapterHack

public class AwtExceptionHandlerAdapterHack
extends Object

Uncaught exception handler designed to work with JDK 1.4 and 1.5's primitive API for registering exception handlers for the event thread. It's impossible to set an exception handler for the event thread in jdk 1.4 (and 1.5). See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4714232 So this effectively only works in Sun's JDK.

Since:
0.3
Author:
Geoffrey De Smet, Keith Donald

Constructor Summary
AwtExceptionHandlerAdapterHack()
          No-arg constructor required so Sun's JDK can construct the instance.
 
Method Summary
 void handle(Throwable throwable)
           
static void registerExceptionHandler(RegisterableExceptionHandler exceptionHandlerDelegate)
          Sets the SUN_AWT_EXCEPTION_HANDLER_KEY system property to register this class as the event thread's exception handler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AwtExceptionHandlerAdapterHack

public AwtExceptionHandlerAdapterHack()
No-arg constructor required so Sun's JDK can construct the instance.

Method Detail

handle

public void handle(Throwable throwable)

registerExceptionHandler

public static void registerExceptionHandler(RegisterableExceptionHandler exceptionHandlerDelegate)
Sets the SUN_AWT_EXCEPTION_HANDLER_KEY system property to register this class as the event thread's exception handler. When called back, this class simply forwards to the delegate.

Parameters:
exceptionHandlerDelegate - the "real" exception handler to delegate to when an uncaught exception occurs.

SRJRCFrames
v0.1.296

hosted at
Find SRJRCFrames at SourceForge.net. Fast, secure and free:
           Open Source Software download
Submit a bug or request a feature

SRJRCFrames is published according to the GNU General Public License
Copyright 2005-2012 Reinhard Mantey - some rights reserved.