Class UncaughtExceptionHandlers
- java.lang.Object
- 
- com.google.common.util.concurrent.UncaughtExceptionHandlers
 
- 
 @GwtIncompatible public final class UncaughtExceptionHandlers extends java.lang.Object Factories forThread.UncaughtExceptionHandlerinstances.- Since:
- 8.0
- Author:
- Gregory Kick
 
- 
- 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Thread.UncaughtExceptionHandlersystemExit()Returns an exception handler that exits the system.
 
- 
- 
- 
Method Detail- 
systemExitpublic static java.lang.Thread.UncaughtExceptionHandler systemExit() Returns an exception handler that exits the system. This is particularly useful for the main thread, which may start up other, non-daemon threads, but fail to fully initialize the application successfully.Example usage: public static void main(String[] args) { Thread.currentThread().setUncaughtExceptionHandler(UncaughtExceptionHandlers.systemExit()); ...The returned handler logs any exception at severity SEVEREand then shuts down the process with an exit status of 1, indicating abnormal termination.
 
- 
 
-