Commit 8154d06315c627afc89ad40e76113a5d9ed17c40

Authored by Mumfrey
1 parent 9174b3b0

Fix crash reporting

src/main/java/com/mumfrey/liteloader/core/LiteLoader.java
@@ -32,9 +32,9 @@ import com.mumfrey.liteloader.common.LoadingProgress; @@ -32,9 +32,9 @@ import com.mumfrey.liteloader.common.LoadingProgress;
32 import com.mumfrey.liteloader.core.api.LiteLoaderCoreAPI; 32 import com.mumfrey.liteloader.core.api.LiteLoaderCoreAPI;
33 import com.mumfrey.liteloader.core.event.EventProxy; 33 import com.mumfrey.liteloader.core.event.EventProxy;
34 import com.mumfrey.liteloader.core.event.HandlerList; 34 import com.mumfrey.liteloader.core.event.HandlerList;
35 -import com.mumfrey.liteloader.crashreport.CallableLaunchWrapper;  
36 -import com.mumfrey.liteloader.crashreport.CallableLiteLoaderBrand;  
37 -import com.mumfrey.liteloader.crashreport.CallableLiteLoaderMods; 35 +import com.mumfrey.liteloader.crashreport.CrashSectionLaunchWrapper;
  36 +import com.mumfrey.liteloader.crashreport.CrashSectionLiteLoaderBrand;
  37 +import com.mumfrey.liteloader.crashreport.CrashSectionLiteLoaderMods;
38 import com.mumfrey.liteloader.interfaces.FastIterableDeque; 38 import com.mumfrey.liteloader.interfaces.FastIterableDeque;
39 import com.mumfrey.liteloader.interfaces.Loadable; 39 import com.mumfrey.liteloader.interfaces.Loadable;
40 import com.mumfrey.liteloader.interfaces.LoadableMod; 40 import com.mumfrey.liteloader.interfaces.LoadableMod;
@@ -1022,9 +1022,9 @@ public final class LiteLoader @@ -1022,9 +1022,9 @@ public final class LiteLoader
1022 private static void populateCrashReport(CrashReport crashReport) 1022 private static void populateCrashReport(CrashReport crashReport)
1023 { 1023 {
1024 CrashReportCategory category = crashReport.getCategory(); // crashReport.makeCategoryDepth("Mod System Details", 1); 1024 CrashReportCategory category = crashReport.getCategory(); // crashReport.makeCategoryDepth("Mod System Details", 1);
1025 - category.addCrashSection("Mod Pack", new CallableLiteLoaderBrand(crashReport));  
1026 - category.addCrashSection("LiteLoader Mods", new CallableLiteLoaderMods(crashReport));  
1027 - category.addCrashSection("LaunchWrapper", new CallableLaunchWrapper(crashReport)); 1025 + category.addCrashSection("LiteLoader Brand", new CrashSectionLiteLoaderBrand(crashReport));
  1026 + category.addCrashSection("LiteLoader Mods", new CrashSectionLiteLoaderMods(crashReport));
  1027 + category.addCrashSection("LaunchWrapper", new CrashSectionLaunchWrapper(crashReport));
1028 } 1028 }
1029 1029
1030 static final void createInstance(LoaderEnvironment environment, LoaderProperties properties, LaunchClassLoader classLoader) 1030 static final void createInstance(LoaderEnvironment environment, LoaderProperties properties, LaunchClassLoader classLoader)
src/main/java/com/mumfrey/liteloader/crashreport/CallableLaunchWrapper.java renamed to src/main/java/com/mumfrey/liteloader/crashreport/CrashSectionLaunchWrapper.java
@@ -12,22 +12,22 @@ import net.minecraft.crash.CrashReport; @@ -12,22 +12,22 @@ import net.minecraft.crash.CrashReport;
12 import net.minecraft.launchwrapper.IClassTransformer; 12 import net.minecraft.launchwrapper.IClassTransformer;
13 import net.minecraft.launchwrapper.Launch; 13 import net.minecraft.launchwrapper.Launch;
14 14
15 -public class CallableLaunchWrapper implements Callable<String> 15 +public class CrashSectionLaunchWrapper
16 { 16 {
17 final CrashReport crashReport; 17 final CrashReport crashReport;
18 18
19 - public CallableLaunchWrapper(CrashReport report) 19 + public CrashSectionLaunchWrapper(CrashReport report)
20 { 20 {
21 this.crashReport = report; 21 this.crashReport = report;
22 } 22 }
23 23
24 /* (non-Javadoc) 24 /* (non-Javadoc)
25 - * @see java.util.concurrent.Callable#call() 25 + * @see java.lang.Object#toString()
26 */ 26 */
27 @Override 27 @Override
28 - public String call() throws Exception 28 + public String toString()
29 { 29 {
30 - return CallableLaunchWrapper.generateTransformerList(); 30 + return CrashSectionLaunchWrapper.generateTransformerList();
31 } 31 }
32 32
33 /** 33 /**
src/main/java/com/mumfrey/liteloader/crashreport/CallableLiteLoaderBrand.java renamed to src/main/java/com/mumfrey/liteloader/crashreport/CrashSectionLiteLoaderBrand.java
@@ -5,26 +5,24 @@ @@ -5,26 +5,24 @@
5 */ 5 */
6 package com.mumfrey.liteloader.crashreport; 6 package com.mumfrey.liteloader.crashreport;
7 7
8 -import java.util.concurrent.Callable;  
9 -  
10 import com.mumfrey.liteloader.core.LiteLoader; 8 import com.mumfrey.liteloader.core.LiteLoader;
11 9
12 import net.minecraft.crash.CrashReport; 10 import net.minecraft.crash.CrashReport;
13 11
14 -public class CallableLiteLoaderBrand implements Callable<String> 12 +public class CrashSectionLiteLoaderBrand
15 { 13 {
16 final CrashReport crashReport; 14 final CrashReport crashReport;
17 15
18 - public CallableLiteLoaderBrand(CrashReport report) 16 + public CrashSectionLiteLoaderBrand(CrashReport report)
19 { 17 {
20 this.crashReport = report; 18 this.crashReport = report;
21 } 19 }
22 20
23 /* (non-Javadoc) 21 /* (non-Javadoc)
24 - * @see java.util.concurrent.Callable#call() 22 + * @see java.lang.Object#toString()
25 */ 23 */
26 @Override 24 @Override
27 - public String call() throws Exception 25 + public String toString()
28 { 26 {
29 String brand = null; 27 String brand = null;
30 try 28 try
src/main/java/com/mumfrey/liteloader/crashreport/CallableLiteLoaderMods.java renamed to src/main/java/com/mumfrey/liteloader/crashreport/CrashSectionLiteLoaderMods.java
@@ -5,26 +5,24 @@ @@ -5,26 +5,24 @@
5 */ 5 */
6 package com.mumfrey.liteloader.crashreport; 6 package com.mumfrey.liteloader.crashreport;
7 7
8 -import java.util.concurrent.Callable;  
9 -  
10 import com.mumfrey.liteloader.core.LiteLoader; 8 import com.mumfrey.liteloader.core.LiteLoader;
11 9
12 import net.minecraft.crash.CrashReport; 10 import net.minecraft.crash.CrashReport;
13 11
14 -public class CallableLiteLoaderMods implements Callable<String> 12 +public class CrashSectionLiteLoaderMods
15 { 13 {
16 final CrashReport crashReport; 14 final CrashReport crashReport;
17 15
18 - public CallableLiteLoaderMods(CrashReport report) 16 + public CrashSectionLiteLoaderMods(CrashReport report)
19 { 17 {
20 this.crashReport = report; 18 this.crashReport = report;
21 } 19 }
22 20
23 /* (non-Javadoc) 21 /* (non-Javadoc)
24 - * @see java.util.concurrent.Callable#call() 22 + * @see java.lang.Object#toString()
25 */ 23 */
26 @Override 24 @Override
27 - public String call() throws Exception 25 + public String toString()
28 { 26 {
29 try 27 try
30 { 28 {