mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-11 07:39:39 +07:00
Various things
This commit is contained in:
parent
0770574f17
commit
85fd2ad804
@ -1,6 +1,7 @@
|
||||
package io.anuke.mindustry.net;
|
||||
|
||||
import io.anuke.arc.*;
|
||||
import io.anuke.arc.Net.*;
|
||||
import io.anuke.arc.collection.*;
|
||||
import io.anuke.arc.function.*;
|
||||
import io.anuke.arc.util.*;
|
||||
@ -103,7 +104,7 @@ public class CrashSender{
|
||||
|
||||
Log.info("Sending crash report.");
|
||||
//post to crash report URL
|
||||
Core.net.httpPost(Vars.crashReportURL, value.toJson(OutputType.json), r -> {
|
||||
httpPost(Vars.crashReportURL, value.toJson(OutputType.json), r -> {
|
||||
Log.info("Crash sent successfully.");
|
||||
sent[0] = true;
|
||||
System.exit(1);
|
||||
@ -126,6 +127,10 @@ public class CrashSender{
|
||||
}
|
||||
}
|
||||
|
||||
private static void httpPost(String url, String content, Consumer<HttpResponse> success, Consumer<Throwable> failure){
|
||||
new NetJavaImpl().http(new HttpRequest().method(HttpMethod.POST).content(content).url(url), success, failure);
|
||||
}
|
||||
|
||||
private static String parseException(Throwable e){
|
||||
StringWriter sw = new StringWriter();
|
||||
PrintWriter pw = new PrintWriter(sw);
|
||||
|
Loading…
Reference in New Issue
Block a user