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 Details

    • UncaughtExceptionHandler

      public UncaughtExceptionHandler()
  • Method Details

    • uncaughtException

      public void uncaughtException(Thread t, Throwable e)
      Called when an uncaught exception is thrown. Will display the error message in a dialog box.
      Specified by:
      uncaughtException in interface Thread.UncaughtExceptionHandler
      Parameters:
      t - the thread where the exception was throws.
      e - the thrown exception.
    • setParentComponent

      public void setParentComponent(Component parentComponent)
      Sets the parent component where an error dialog might be displayed.
      Parameters:
      parentComponent - a component where an error dialog might be displayed.