UncaughtExceptionHandlers.java
1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package com.google.common.util.concurrent;
import com.google.common.annotations.VisibleForTesting;
import java.io.PrintStream;
import java.util.logging.Level;
import java.util.logging.Logger;
public final class UncaughtExceptionHandlers
{
public static Thread.UncaughtExceptionHandler systemExit()
{
return new a(Runtime.getRuntime());
}
@VisibleForTesting
static final class a
implements Thread.UncaughtExceptionHandler
{
private static final Logger a = Logger.getLogger(a.class.getName());
private final Runtime b;
a(Runtime paramRuntime)
{
this.b = paramRuntime;
}
public final void uncaughtException(Thread paramThread, Throwable paramThrowable)
{
try
{
a.log(Level.SEVERE, String.format("Caught an exception in %s. Shutting down.", new Object[] { paramThread }), paramThrowable);
return;
}
catch (Throwable paramThread)
{
System.err.println(paramThrowable.getMessage());
System.err.println(paramThread.getMessage());
return;
}
finally
{
this.b.exit(1);
}
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/google/common/util/concurrent/UncaughtExceptionHandlers.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/