public static void logUncaughtExceptions ( Logging logger ) { try { Thread . setDefaultUncaughtExceptionHandler ( ( t , e ) -> logger . exception ( e ) ) ; } catch ( SecurityException e ) { logger . warning ( "Could not set the Default Uncaught Exception Handler" , e ) ; } }
Setup logging of uncaught exceptions .