debugging

This commit is contained in:
Daniella / Tove 2022-07-07 23:59:31 +02:00
parent 8d9b66e7d7
commit 95d8c7e5dd

View file

@ -2,26 +2,29 @@ package de.tudbut.tryumph;
import java.util.Arrays;
import de.tudbut.async.Task;
import de.tudbut.tryumph.config.IRequestCatcher;
import de.tudbut.tryumph.config.RequestCatcherConfig;
import de.tudbut.tryumph.config.TryConfig;
import de.tudbut.tryumph.err.ProjectException;
import de.tudbut.tryumph.server.http.Server;
import de.tudbut.tryumph.util.Bug;
import tudbut.global.DebugStateManager;
public class Launch {
private static TryConfig config;
private static RequestCatcherConfig[] catchers;
public static void main(String[] args) throws ProjectException, InterruptedException {
public static void main(String[] args) throws ProjectException, InterruptedException {
if(args.length > 0 && args[0].equals("--debug"))
DebugStateManager.enableDebug();
TryConfig config;
RequestCatcherConfig[] catchers;
try {
config = new TryConfig(args, Launch.class.getClassLoader().getResourceAsStream("config.try"));
catchers = config.getCatchers().ok().await();
catchers = config.getCatchers().ok().await();
} catch(Exception e) {
throw new ProjectException("Error loading project", e);
}
System.out.println(Arrays.toString(catchers));
for(int i = 0; i < catchers.length; i++) {
try {
RequestCatcherConfig catcher = catchers[i];