@GwtIncompatible public final class UncaughtExceptionHandlers extends Object
Thread.UncaughtExceptionHandler
instances.Modifier and Type | Method and Description |
---|---|
static Thread.UncaughtExceptionHandler |
systemExit()
Returns an exception handler that exits the system.
|
public static Thread.UncaughtExceptionHandler systemExit()
Example usage:
public static void main(String[] args) { Thread.currentThread().setUncaughtExceptionHandler(UncaughtExceptionHandlers.systemExit()); ...
The returned handler logs any exception at severity SEVERE
and then shuts down the
process with an exit status of 1, indicating abnormal termination.
Copyright © 2010–2017. All rights reserved.