com.darwinsys.swingui
Class ErrorUtil

java.lang.Object
  extended by com.darwinsys.swingui.ErrorUtil

public class ErrorUtil
extends java.lang.Object

Convenience class for fielding Exceptions in a Swing App. Displays exceptions in a JOptionPane, and follows chained exceptions, both the 1.x SQLException.getNextExeption() and the new 1.4 Exception.getCause().

The user (will be able to) press a Details... button to see the traceback in a dialog; tracebacks are not displayed unless the user requests them.

Version:
$Id: ErrorUtil.java,v 1.10 2006/04/29 13:14:45 ian Exp $
Author:
Ian Darwin

Nested Class Summary
protected static class ErrorUtil.DetailsDialog
          Inner class Dialog to display the details of an Exception
 
Constructor Summary
ErrorUtil()
          Public no-arg constructor for those who like simple instantiation.
 
Method Summary
 void handle(java.lang.Throwable th)
          Convenience routine for use with AWT's dispatch thread.
static void showExceptions(java.awt.Component parent, java.lang.Throwable theExc)
          Show the given Exception (and any nested Exceptions) in JOptionPane(s).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrorUtil

public ErrorUtil()
Public no-arg constructor for those who like simple instantiation.

Method Detail

handle

public void handle(java.lang.Throwable th)
Convenience routine for use with AWT's dispatch thread. Usage:
 System.setProperty("sun.awt.exception.handler",
                "com.darwinsys.swingui.ErrorUtil");
 


showExceptions

public static void showExceptions(java.awt.Component parent,
                                  java.lang.Throwable theExc)
Show the given Exception (and any nested Exceptions) in JOptionPane(s).



Copyright © 1996-2004 Ian F. Darwin. See license.html for usage license.