Class FallbackExceptionHandler

java.lang.Object
ca.corbett.extras.FallbackExceptionHandler
All Implemented Interfaces:
Thread.UncaughtExceptionHandler

public class FallbackExceptionHandler extends Object implements Thread.UncaughtExceptionHandler
Fallback handler for any exception that goes uncaught in any thread. This class ensures that the exception gets logged with the full stack trace. By default, uncaught exceptions print a stack trace to the console, but that is not helpful if the application wasn't started via a terminal.

Use the static register() method to set this as the default uncaught exception handler for all threads in your application startup code.

Note that this handler will only be used if the current Thread and/or ThreadGroup does not have its own uncaught exception handler. This class represents a last-ditch fallback.

Since:
swing-extras 2.9
Author:
scorbo2
  • Constructor Details

    • FallbackExceptionHandler

      public FallbackExceptionHandler()
  • Method Details