|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.af.commons.errorhandling.ErrorHandler
public class ErrorHandler
Manager class which handles everything concerning the error handling. You can: - install default exception handlers on the current thread and the EDT - make GUI dialogs for different error types - make a GUI dialog to inform about an error / bug and mail logging info The class is singleton but can be extended by inheritance. For that reason the only creation of an instance is allowed thru the init method an that only once.
| Method Summary | |
|---|---|
String |
getDeveloperAddress()
|
static ErrorHandler |
getInstance()
|
String |
getReportURL()
|
static void |
init(String developerAddress,
String reportURL,
boolean installDefaultExceptionHandlerOnCurrentThread,
boolean installDefaultExceptionHandlerOnEDT)
Initialize the singleton error handler |
static void |
init(String developerAddress,
String reportURL,
boolean installDefaultExceptionHandlerOnCurrentThread,
boolean installDefaultExceptionHandlerOnEDT,
Class clazz)
Initialize the singleton error handler |
void |
makeErrDialog(String msg)
creates a dialog for an error |
void |
makeErrDialog(String msg,
Throwable e)
creates a dialog for an error |
void |
makeErrDialog(String msg,
Throwable e,
boolean fatal)
creates a dialog for an error |
static void |
setErrorDialogClass(Class clazz)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void init(String developerAddress,
String reportURL,
boolean installDefaultExceptionHandlerOnCurrentThread,
boolean installDefaultExceptionHandlerOnEDT,
Class clazz)
developerAddress - mail address of the developers, used in inform dialog (don't pass null)installDefaultExceptionHandlerOnCurrentThread - install DefaultExceptionHandler on the current thread ?installDefaultExceptionHandlerOnEDT - installs DefaultExceptionHandler on the current threadclazz - Class of the InformDialog to be called
RuntimeException - when developerAddress is null or init was already called before
public static void init(String developerAddress,
String reportURL,
boolean installDefaultExceptionHandlerOnCurrentThread,
boolean installDefaultExceptionHandlerOnEDT)
developerAddress - mail address of the developers, used in inform dialog (don't pass null)installDefaultExceptionHandlerOnCurrentThread - install DefaultExceptionHandler on the current thread ?installDefaultExceptionHandlerOnEDT - installs DefaultExceptionHandler on the current thread
RuntimeException - when developerAddress is null or init was already called beforepublic static ErrorHandler getInstance()
RuntimeException - when not initialized before.public String getDeveloperAddress()
public String getReportURL()
public void makeErrDialog(String msg,
Throwable e,
boolean fatal)
msg - error messagee - cause of errorfatal - is the error a fatal error and the application should be shut down
public void makeErrDialog(String msg,
Throwable e)
msg - error messagee - cause of errorpublic void makeErrDialog(String msg)
msg - error messagepublic static void setErrorDialogClass(Class clazz)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||