what-the-bank/sources/com/google/common/util/concurrent/UncaughtExceptionHandlers.java

38 lines
1.1 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.common.util.concurrent;
import java.lang.Thread;
import java.util.Locale;
import java.util.logging.Level;
import java.util.logging.Logger;
/* loaded from: classes2.dex */
public final class UncaughtExceptionHandlers {
private UncaughtExceptionHandlers() {
}
public static Thread.UncaughtExceptionHandler systemExit() {
return new Exiter(Runtime.getRuntime());
}
/* loaded from: classes2.dex */
static final class Exiter implements Thread.UncaughtExceptionHandler {
private static final Logger logger = Logger.getLogger(Exiter.class.getName());
private final Runtime runtime;
Exiter(Runtime runtime) {
this.runtime = runtime;
}
@Override // java.lang.Thread.UncaughtExceptionHandler
public final void uncaughtException(Thread thread, Throwable th) {
try {
logger.log(Level.SEVERE, String.format(Locale.ROOT, "Caught an exception in %s. Shutting down.", thread), th);
} finally {
try {
} finally {
}
}
}
}
}