ehsbe CommonsTM
Version 1.1.0rc3

com.ehsbe.commons.gui
Class GuiErrorHandler

java.lang.Object
  extended by com.ehsbe.commons.gui.GuiErrorHandler

public class GuiErrorHandler
extends Object

An GUI error handler - i.e. usually displays something in response to a throwable.

Version:
$Revision: 432 $
Author:
Jens Elkner

Constructor Summary
GuiErrorHandler()
           
 
Method Summary
 void handle(Component parent, Throwable t)
          Do the appropriate action on a throwable.
static void handleStandard(Component parent, Throwable t)
          Default method used to handle throwables.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GuiErrorHandler

public GuiErrorHandler()
Method Detail

handle

public void handle(Component parent,
                   Throwable t)
Do the appropriate action on a throwable.

For GUIs, the callee makes sure, that is method is called in the EDT (Event Dispatch Thread), so no need to take special handling here.

Parameters:
parent - the anchor for a dialog
t - throwable to handle
See Also:
handleStandard(Component, Throwable)

handleStandard

public static void handleStandard(Component parent,
                                  Throwable t)
Default method used to handle throwables. It just displays the trowables localized message in a JOptionPane dialog.

Parameters:
parent - the anchor for a dialog
t - throwable to handle

ehsbe CommonsTM
Version 1.1.0rc3

Copyright ©2005-2009 EHSBE, Walther-Rathenau-Str. 58, 39104 Magdeburg, Sachsen-Anhalt, Germany. All Rights Reserved.