public final class UncaughtExceptionHandlers extends Object
Thread.UncaughtExceptionHandler which logs the last uncaught exception with a SLF4J
Logger on ERROR level.
Copied (and modified to use SLF4J) from Google Guava.| 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());
...
Copyright © 2014. All rights reserved.