diff --git a/assignments/src/MV3500Cohort2019JulySeptember/homework1/BoronTcpExample1Telnet1.java b/assignments/src/MV3500Cohort2019JulySeptember/homework1/BoronTcpExample1Telnet1.java index a38074ce5fbb6c0c186f8f8eb6881c8ed5dd7039..1f58d7a6a96d544d4a6546380ca212596847affa 100644 --- a/assignments/src/MV3500Cohort2019JulySeptember/homework1/BoronTcpExample1Telnet1.java +++ b/assignments/src/MV3500Cohort2019JulySeptember/homework1/BoronTcpExample1Telnet1.java @@ -76,10 +76,11 @@ public class BoronTcpExample1Telnet1 } catch(IOException e) { - System.out.println("problem with networking: " + e); -// if (e.getClass() == java.net.BindException) // TODO whazzup? - if (e.getMessage().equals("Address already in use: NET_Bind")) - System.out.println("Be sure to stop any other running instances of this program."); + System.out.println("Problem with TcpExample1Telnet networking:"); // describe what is happening + System.out.println("Error: " + e); + // Provide more helpful information to user if exception occurs due to running twice at one time + if (e instanceof java.net.BindException) + System.out.println("*** Be sure to stop any other running instances of programs using this port!"); } } }