mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-12 00:47:26 -04:00
handle TextParseException correctly, show full exception in Server info
This commit is contained in:
parent
982af3b5e5
commit
32fb5092c3
@ -332,7 +332,7 @@ public class ServerListCell extends ListCell<Server> implements Initializable {
|
||||
|
||||
if (server.getLastPing() != null) {
|
||||
if (server.getLastPing().getLastConnectionException() != null) {
|
||||
Label lastConnectionExceptionLabel = new Label(server.getLastPing().getLastConnectionException().getLocalizedMessage());
|
||||
Label lastConnectionExceptionLabel = new Label(server.getLastPing().getLastConnectionException().toString());
|
||||
lastConnectionExceptionLabel.setStyle("-fx-text-fill: red");
|
||||
grid.add(new Label("Last connection exception:"), 0, ++column);
|
||||
grid.add(lastConnectionExceptionLabel, 1, column);
|
||||
|
@ -86,8 +86,10 @@ public class Connection {
|
||||
try {
|
||||
addresses = DNSUtil.getServerAddresses(hostname);
|
||||
} catch (TextParseException e) {
|
||||
setConnectionState(ConnectionStates.FAILED_NO_RETRY);
|
||||
network.lastException = e;
|
||||
e.printStackTrace();
|
||||
throw new RuntimeException(e);
|
||||
return;
|
||||
}
|
||||
}
|
||||
address = addresses.getFirst();
|
||||
|
Loading…
x
Reference in New Issue
Block a user