Initial proof-of-concept for crash report server
This commit is contained in:
@@ -40,6 +40,7 @@ public class Vars{
|
||||
//discord group URL
|
||||
public static final String discordURL = "https://discord.gg/BKADYds";
|
||||
public static final String releasesURL = "https://api.github.com/repos/Anuken/Mindustry/releases";
|
||||
public static final String crashReportURL = "http://localhost:8080/report";
|
||||
public static final int maxTextLength = 150;
|
||||
public static final int maxNameLength = 40;
|
||||
public static final float itemSize = 5f;
|
||||
|
||||
@@ -51,6 +51,7 @@ public class Control extends Module{
|
||||
private Throwable error;
|
||||
|
||||
public Control(){
|
||||
if(true) throw new RuntimeException("This should crash.");
|
||||
|
||||
saves = new Saves();
|
||||
db = new ContentDatabase();
|
||||
|
||||
@@ -309,8 +309,12 @@ public class Net{
|
||||
}
|
||||
|
||||
public static void http(String url, String method, Consumer<String> listener, Consumer<Throwable> failure){
|
||||
http(url, method, null, listener, failure);
|
||||
}
|
||||
|
||||
public static void http(String url, String method, String body, Consumer<String> listener, Consumer<Throwable> failure){
|
||||
HttpRequest req = new HttpRequestBuilder().newRequest()
|
||||
.method(method).url(url).build();
|
||||
.method(method).url(url).content(body).build();
|
||||
|
||||
Gdx.net.sendHttpRequest(req, new HttpResponseListener(){
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user