UncaughtExceptionHandler instances.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Thread. |
| UncaughtExceptionHandlers | back to summary |
|---|---|
| private UncaughtExceptionHandlers() | |
| systemExit | back to summary |
|---|---|
| public static Thread. 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 | |
| Modifier and Type | Field and Description |
|---|---|
| private static final LazyLogger | |
| private final Runtime |
| Modifier and Type | Method and Description |
|---|---|
| public void | uncaughtException(Thread
the thread t, Throwable the exception e)Implements java. |
| logger | back to summary |
|---|---|
| private static final LazyLogger logger | |
| runtime | back to summary |
|---|---|
| private final Runtime runtime | |
| Exiter | back to summary |
|---|---|
| pack-priv Exiter(Runtime runtime) | |
| uncaughtException | back to summary |
|---|---|
| public void uncaughtException(Thread t, Throwable e) Implements java. Doc from java. Method invoked when the given thread terminates due to the given uncaught exception. Any exception thrown by this method will be ignored by the Java Virtual Machine. | |