MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / onCrashReport

Method onCrashReport

src/main/java/net/optifine/CrashReporter.java:15–70  ·  view source on GitHub ↗
(CrashReport crashReport, CrashReportCategory category)

Source from the content-addressed store, hash-verified

13public class CrashReporter
14{
15 public static void onCrashReport(CrashReport crashReport, CrashReportCategory category)
16 {
17 try
18 {
19 Throwable throwable = crashReport.getCrashCause();
20
21 if (throwable == null)
22 {
23 return;
24 }
25
26 if (throwable.getClass().getName().contains(".fml.client.SplashProgress"))
27 {
28 return;
29 }
30
31 if (throwable.getClass() == Throwable.class)
32 {
33 return;
34 }
35
36 extendCrashReport(category);
37 GameSettings gamesettings = Config.getGameSettings();
38
39 if (gamesettings == null)
40 {
41 return;
42 }
43
44 if (!gamesettings.snooperEnabled)
45 {
46 return;
47 }
48
49 String s = "http://optifine.net/crashReport";
50 String s1 = makeReport(crashReport);
51 byte[] abyte = s1.getBytes("ASCII");
52 IFileUploadListener ifileuploadlistener = new IFileUploadListener()
53 {
54 public void fileUploadFinished(String url, byte[] content, Throwable exception)
55 {
56 }
57 };
58 Map map = new HashMap();
59 map.put("OF-Version", Config.getVersion());
60 map.put("OF-Summary", makeSummary(crashReport));
61 FileUploadThread fileuploadthread = new FileUploadThread(s, map, abyte, ifileuploadlistener);
62 fileuploadthread.setPriority(10);
63 fileuploadthread.start();
64 Thread.sleep(1000L);
65 }
66 catch (Exception exception)
67 {
68 Config.dbg(exception.getClass().getName() + ": " + exception.getMessage());
69 }
70 }
71
72 private static String makeReport(CrashReport crashReport)

Callers 1

getCompleteReportMethod · 0.95

Calls 15

extendCrashReportMethod · 0.95
getGameSettingsMethod · 0.95
makeReportMethod · 0.95
getVersionMethod · 0.95
makeSummaryMethod · 0.95
dbgMethod · 0.95
getCrashCauseMethod · 0.80
getBytesMethod · 0.80
setPriorityMethod · 0.80
sleepMethod · 0.80
getNameMethod · 0.65
putMethod · 0.65

Tested by

no test coverage detected