Class ApplicationExceptionHandler
java.lang.Object
org.nuiton.jaxx.application.swing.util.ApplicationExceptionHandler
- All Implemented Interfaces:
java.lang.Thread.UncaughtExceptionHandler
public class ApplicationExceptionHandler
extends java.lang.Object
implements java.lang.Thread.UncaughtExceptionHandler
Global exception handler.
Catch all application uncaught and display it in a custom JoptionPane
or JXErrorPane.
See http://stackoverflow.com/a/4448569/1165234 for details.
- Since:
- 2.8
- Author:
- Tony Chemit - chemit@codelutin.com
-
Constructor Summary
Constructors Constructor Description ApplicationExceptionHandler(ApplicationErrorHelper errorHelper) -
Method Summary
Modifier and Type Method Description protected java.lang.ThrowablegetCause(java.lang.Throwable ex)voidhandle(java.lang.Throwable thrown)protected voidhandleException(java.lang.String tname, java.lang.Throwable ex)voidshowErrorDialog(java.lang.String message, java.lang.Throwable cause)voiduncaughtException(java.lang.Thread t, java.lang.Throwable ex)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ApplicationExceptionHandler
-
-
Method Details
-
uncaughtException
public void uncaughtException(java.lang.Thread t, java.lang.Throwable ex)- Specified by:
uncaughtExceptionin interfacejava.lang.Thread.UncaughtExceptionHandler
-
handle
public void handle(java.lang.Throwable thrown) -
handleException
protected void handleException(java.lang.String tname, java.lang.Throwable ex) -
getCause
protected java.lang.Throwable getCause(java.lang.Throwable ex) -
showErrorDialog
public void showErrorDialog(java.lang.String message, java.lang.Throwable cause)
-