when testing servers, don't propagate exceptions but do note them

This commit is contained in:
2020-12-17 02:50:28 -06:00
parent e4ea50ac66
commit 4e1156d4bc
2 changed files with 12 additions and 2 deletions

View File

@@ -51,8 +51,16 @@ public class App {
public static void testServers (final List<Server> servers) {
log.log(Level.INFO, "Testing all defined servers");
for (final Server server : servers) {
Object result;
try {
result = PieCannon.testServer(server);
}
catch (final Exception exception) {
result = exception;
}
log.log(Level.INFO, "{0} {1}: {2}", new Object[] {
server.getClass().getSimpleName(), server.getLabel(), PieCannon.testServer(server)
server.getClass().getSimpleName(), server.getLabel(), result
});
}
}