debugging
This commit is contained in:
parent
8d9b66e7d7
commit
95d8c7e5dd
1 changed files with 8 additions and 5 deletions
|
@ -2,26 +2,29 @@ package de.tudbut.tryumph;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
import de.tudbut.async.Task;
|
||||||
import de.tudbut.tryumph.config.IRequestCatcher;
|
import de.tudbut.tryumph.config.IRequestCatcher;
|
||||||
import de.tudbut.tryumph.config.RequestCatcherConfig;
|
import de.tudbut.tryumph.config.RequestCatcherConfig;
|
||||||
import de.tudbut.tryumph.config.TryConfig;
|
import de.tudbut.tryumph.config.TryConfig;
|
||||||
import de.tudbut.tryumph.err.ProjectException;
|
import de.tudbut.tryumph.err.ProjectException;
|
||||||
import de.tudbut.tryumph.server.http.Server;
|
import de.tudbut.tryumph.server.http.Server;
|
||||||
import de.tudbut.tryumph.util.Bug;
|
import de.tudbut.tryumph.util.Bug;
|
||||||
|
import tudbut.global.DebugStateManager;
|
||||||
|
|
||||||
public class Launch {
|
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 {
|
try {
|
||||||
config = new TryConfig(args, Launch.class.getClassLoader().getResourceAsStream("config.try"));
|
config = new TryConfig(args, Launch.class.getClassLoader().getResourceAsStream("config.try"));
|
||||||
catchers = config.getCatchers().ok().await();
|
catchers = config.getCatchers().ok().await();
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
throw new ProjectException("Error loading project", e);
|
throw new ProjectException("Error loading project", e);
|
||||||
}
|
}
|
||||||
System.out.println(Arrays.toString(catchers));
|
|
||||||
for(int i = 0; i < catchers.length; i++) {
|
for(int i = 0; i < catchers.length; i++) {
|
||||||
try {
|
try {
|
||||||
RequestCatcherConfig catcher = catchers[i];
|
RequestCatcherConfig catcher = catchers[i];
|
||||||
|
|
Loading…
Add table
Reference in a new issue