Changed output of errors from out to err.

This commit is contained in:
WickedJack99
2024-04-07 11:55:14 +02:00
parent af69ffd0e7
commit 33ea792d5e
2 changed files with 4 additions and 4 deletions

View File

@@ -38,7 +38,7 @@ public class NetworkController {
socket.setReuseAddress(true);
socket.bind(new InetSocketAddress(ipAddress, port));
} catch (Exception e) {
System.out.println("Port: " + port + " is closed or not reachable on ip: " + ipAddress);
System.err.println("Port: " + port + " is closed or not reachable on ip: " + ipAddress);
if (socket != null) {
socket.close();
socket = null;

View File

@@ -42,11 +42,11 @@ public class SenderThread extends Thread implements Terminatable {
ds.send(dp);
}
} catch (UnknownHostException e) {
System.out.println("Error, host is unknown or unreachable.");
System.err.println("Error, host is unknown or unreachable.");
} catch (IOException e) {
System.out.println("Error, wasn't able to send data, because of problem with socket.");
System.err.println("Error, wasn't able to send data, because of problem with socket.");
} catch (InterruptedException e) {
System.out.println("Error, sending queue was interrupted. Terminating (this) sending thread..");
System.err.println("Error, sending queue was interrupted. Terminating (this) sending thread..");
this.terminate();
}
}