Crash report fixes / Mobile mech fixes / Multiplayer fixes
This commit is contained in:
@@ -19,7 +19,7 @@ public class CrashHandler{
|
||||
|
||||
//don't create crash logs for me (anuke), as it's expected
|
||||
//also don't create logs for custom builds
|
||||
if(System.getProperty("user.name").equals("anuke") || Version.build == -1) return;
|
||||
//if(System.getProperty("user.name").equals("anuke") || Version.build == -1) return;
|
||||
|
||||
boolean netActive = false, netServer = false;
|
||||
|
||||
@@ -40,14 +40,21 @@ public class CrashHandler{
|
||||
ex(() -> value.addChild("build", new JsonValue(Version.build)));
|
||||
ex(() -> value.addChild("net", new JsonValue(fn)));
|
||||
ex(() -> value.addChild("server", new JsonValue(fs)));
|
||||
ex(() -> value.addChild("gamemode", new JsonValue(Vars.state.mode.toString())));
|
||||
ex(() -> value.addChild("gamemode", new JsonValue(Vars.state.mode.name())));
|
||||
ex(() -> value.addChild("state", new JsonValue(Vars.state.getState().name())));
|
||||
ex(() -> value.addChild("os", new JsonValue(System.getProperty("os.name"))));
|
||||
ex(() -> value.addChild("multithreading", new JsonValue(Settings.getBool("multithread"))));
|
||||
ex(() -> value.addChild("trace", new JsonValue(parseException(e))));
|
||||
|
||||
Log.info("Sending crash report.");
|
||||
//post to crash report URL
|
||||
Net.http(Vars.crashReportURL, "POST", value.toJson(OutputType.json), r -> System.exit(1), t -> System.exit(1));
|
||||
Net.http(Vars.crashReportURL, "POST", value.toJson(OutputType.json), r -> {
|
||||
Log.info("Crash sent successfully.");
|
||||
System.exit(1);
|
||||
}, t -> {
|
||||
t.printStackTrace();
|
||||
System.exit(1);
|
||||
});
|
||||
|
||||
//sleep forever
|
||||
try{ Thread.sleep(Long.MAX_VALUE); }catch(InterruptedException ignored){}
|
||||
|
||||
Reference in New Issue
Block a user