My Movies 1.0.0

hirondelle.movies.exception
Class ExceptionHandler

Object
  extended by ExceptionHandler

public final class ExceptionHandler
extends Object

Custom handler for uncaught exceptions.

By default, a Swing app will handle uncaught exceptions simply by printing a stack trace to System.err. However, the end user sees nothing happen. This class addresses that problem, by showing the end user a simple error message in a modal dialog. (The dialog's owner is the currently active frame.)

In JDK1.4, the simplest way of overriding the default handler for uncaught exceptions is to use the following undocumented feature :

The above technique is used by this class.

Other alternative methods include :


Constructor Summary
ExceptionHandler()
          No-argument constructor.
 
Method Summary
 void handle(Throwable aThrowable)
          Custom handler for uncaught exceptions.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExceptionHandler

public ExceptionHandler()
No-argument constructor. This class must have a no-arg constructor (see class comment).

Method Detail

handle

public void handle(Throwable aThrowable)
Custom handler for uncaught exceptions.

Displays a simple model dialog to the user, showing that an error has occured. The text of the error includes Throwable.toString().


My Movies 1.0.0

Copyright Hirondelle Systems - Generated 2008Dec30.15.53