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 TypeMethodDescriptionvoid
setParentComponent
(Component parentComponent) Sets the parent component where an error dialog might be displayed.void
uncaughtException
(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:
uncaughtException
in 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.
-