From 95d8c7e5dd776d7da513205cf816330c9a8815d8 Mon Sep 17 00:00:00 2001 From: TudbuT Date: Thu, 7 Jul 2022 23:59:31 +0200 Subject: [PATCH] debugging --- src/de/tudbut/tryumph/Launch.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/de/tudbut/tryumph/Launch.java b/src/de/tudbut/tryumph/Launch.java index a803994..85e2f78 100644 --- a/src/de/tudbut/tryumph/Launch.java +++ b/src/de/tudbut/tryumph/Launch.java @@ -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];