From 96a0624b288a1e0c99c3ab937e21c0747baf3c4c Mon Sep 17 00:00:00 2001 From: ME1312 Date: Fri, 31 May 2019 15:20:17 -0400 Subject: [PATCH] #45 Fix problematic exception handling --- SubServers.Bungee/pom.xml | 4 ++-- SubServers.Client/Bukkit/pom.xml | 2 +- SubServers.Client/Sponge/pom.xml | 2 +- SubServers.Creator/src/Spigot/template.yml | 2 +- SubServers.Host/pom.xml | 2 +- .../src/net/ME1312/SubServers/Host/ExHost.java | 9 +++++++-- SubServers.Sync/pom.xml | 4 ++-- 7 files changed, 15 insertions(+), 10 deletions(-) diff --git a/SubServers.Bungee/pom.xml b/SubServers.Bungee/pom.xml index e2ef985d..0cb28416 100644 --- a/SubServers.Bungee/pom.xml +++ b/SubServers.Bungee/pom.xml @@ -30,13 +30,13 @@ net.ME1312.Galaxi GalaxiUtil - 19w22a + 19w22b compile net.ME1312.Galaxi GalaxiEngine - 19w22a + 19w22b provided diff --git a/SubServers.Client/Bukkit/pom.xml b/SubServers.Client/Bukkit/pom.xml index a539d379..9c471423 100644 --- a/SubServers.Client/Bukkit/pom.xml +++ b/SubServers.Client/Bukkit/pom.xml @@ -48,7 +48,7 @@ net.ME1312.Galaxi GalaxiUtil - 19w22a + 19w22b compile diff --git a/SubServers.Client/Sponge/pom.xml b/SubServers.Client/Sponge/pom.xml index e84a05c1..66511189 100644 --- a/SubServers.Client/Sponge/pom.xml +++ b/SubServers.Client/Sponge/pom.xml @@ -30,7 +30,7 @@ net.ME1312.Galaxi GalaxiUtil - 19w22a + 19w22b compile diff --git a/SubServers.Creator/src/Spigot/template.yml b/SubServers.Creator/src/Spigot/template.yml index 54e9eb8c..1b556468 100644 --- a/SubServers.Creator/src/Spigot/template.yml +++ b/SubServers.Creator/src/Spigot/template.yml @@ -7,4 +7,4 @@ Template: Require-Version: true Executable: 'bash build.sh' Settings: - Executable: 'java -Xmx1024M -Dorg.bukkit.craftbukkit.libs.jline.terminal=unix -Djansi.passthrough=true -jar Spigot.jar -p $port$' \ No newline at end of file + Executable: 'java -Xmx1024M -Dorg.bukkit.craftbukkit.libs.jline.terminal=unix -Djansi.passthrough=true -jar Spigot.jar' \ No newline at end of file diff --git a/SubServers.Host/pom.xml b/SubServers.Host/pom.xml index 3c079c61..74e21b10 100644 --- a/SubServers.Host/pom.xml +++ b/SubServers.Host/pom.xml @@ -20,7 +20,7 @@ net.ME1312.Galaxi GalaxiEngine - 19w22a + 19w22b compile diff --git a/SubServers.Host/src/net/ME1312/SubServers/Host/ExHost.java b/SubServers.Host/src/net/ME1312/SubServers/Host/ExHost.java index e3e1d4bd..840c283c 100644 --- a/SubServers.Host/src/net/ME1312/SubServers/Host/ExHost.java +++ b/SubServers.Host/src/net/ME1312/SubServers/Host/ExHost.java @@ -227,8 +227,13 @@ public final class ExHost { log.warn.println("UPnP is currently unavailable; Ports may not be automatically forwarded on this device"); } } catch (Exception e) { - log.error.println(e); - engine.stop(1); + if (engine == null) { + e.printStackTrace(); + System.exit(1); + } else { + log.error.println(e); + engine.stop(1); + } } } diff --git a/SubServers.Sync/pom.xml b/SubServers.Sync/pom.xml index c87d3d5f..c8708dad 100644 --- a/SubServers.Sync/pom.xml +++ b/SubServers.Sync/pom.xml @@ -30,13 +30,13 @@ net.ME1312.Galaxi GalaxiUtil - 19w22a + 19w22b compile net.ME1312.Galaxi GalaxiEngine - 19w22a + 19w22b provided