org.chorem.lima.util
Class ErrorHelper

java.lang.Object
  extended by org.chorem.lima.util.ErrorHelper
All Implemented Interfaces:
org.jdesktop.swingx.error.ErrorReporter

public class ErrorHelper
extends Object
implements org.jdesktop.swingx.error.ErrorReporter

Error helper. Used to easily switch real exception interface. Currently used : swingx.

Version:
$Revision: 3051 $ Last update : $Date: 2010-11-29 15:57:16 +0100 (Mon, 29 Nov 2010) $ By : $Author: echatellier $
Author:
chatellier

Constructor Summary
ErrorHelper()
           
 
Method Summary
protected  String formatMessage(String category, String content)
           
 void reportError(org.jdesktop.swingx.error.ErrorInfo errorInfo)
           
static void showErrorDialog(Component parent, String message, Throwable cause)
          Display a user friendly error frame.
static void showErrorDialog(String message)
          Display a user friendly error frame.
static void showErrorDialog(String message, Throwable cause)
          Display a user friendly error frame.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrorHelper

public ErrorHelper()
Method Detail

showErrorDialog

public static void showErrorDialog(Component parent,
                                   String message,
                                   Throwable cause)
Display a user friendly error frame.

Parameters:
parent - parent component
message - message for user
cause - exception cause

showErrorDialog

public static void showErrorDialog(String message)
Display a user friendly error frame.

Parameters:
message - message for user

showErrorDialog

public static void showErrorDialog(String message,
                                   Throwable cause)
Display a user friendly error frame.

Parameters:
message - message for user
cause - exception cause

reportError

public void reportError(org.jdesktop.swingx.error.ErrorInfo errorInfo)
                 throws NullPointerException
Specified by:
reportError in interface org.jdesktop.swingx.error.ErrorReporter
Throws:
NullPointerException

formatMessage

protected String formatMessage(String category,
                               String content)


Copyright © 2008-2011 CodeLutin. All Rights Reserved.