Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8119105

Still cannot rely on Thread.setDefaultUncaughtExceptionHandler() to work with JavaFX App Thread.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • 8
    • javafx
    • None
    • Java 1.8.0ea b90

      Since bug RT-15332 is fixed I was testing to make sure my application's uncaught exception handler was working properly and I noticed that the only way to have the JavaFX application thread make use of it is to set it specifically using Thread.currentThread().setUncaughtExceptionHandler().

      My application already makes use of Thread.setDefaultUncaughtExceptionHandler() to make sure any new threads deal with exceptions in a consistent manner so it would be ideal if the JavaFX thread worked like this as well.

      It looks like this happens because JavaFX already sets its own uncaught exception handler which means the thread never delegates handling to its ThreadGroup which would make use of the "default" uncaught exception handler. Plus I believe that the specific JavaFX exception handler is very similar to ThreadGroup's handling when no outside handlers are set...

            art Artem Ananiev (Inactive)
            csmithjfx Charles Smith (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: