Class UncaughtExceptionHandler
java.lang.Object
com.nilhcem.fakesmtp.core.exception.UncaughtExceptionHandler
- All Implemented Interfaces:
Thread.UncaughtExceptionHandler
public final class UncaughtExceptionHandler
extends Object
implements Thread.UncaughtExceptionHandler
Intercepts every uncaught exception.
- Since:
- 1.1
- Author:
- Nilhcem
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetParentComponent(Component parentComponent) Sets the parent component where an error dialog might be displayed.voiduncaughtException(Thread t, Throwable e) Called when an uncaught exception is thrown.
-
Constructor Details
-
UncaughtExceptionHandler
public UncaughtExceptionHandler()
-
-
Method Details
-
uncaughtException
Called when an uncaught exception is thrown. Will display the error message in a dialog box.- Specified by:
uncaughtExceptionin interfaceThread.UncaughtExceptionHandler- Parameters:
t- the thread where the exception was throws.e- the thrown exception.
-
setParentComponent
Sets the parent component where an error dialog might be displayed.- Parameters:
parentComponent- a component where an error dialog might be displayed.
-