diff --git a/examples/src/TcpExamples/TcpExample1Telnet.java b/examples/src/TcpExamples/TcpExample1Telnet.java index 074e545611945ef692b52f395c4d0496489b7837..5b976a622ccdb0c1888c0974e7e9b09115963f96 100644 --- a/examples/src/TcpExamples/TcpExample1Telnet.java +++ b/examples/src/TcpExamples/TcpExample1Telnet.java @@ -67,6 +67,9 @@ public class TcpExample1Telnet 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 + + // brute force exception checking, can be brittle if exception message changes + // if (e.getMessage().equals("Address already in use: NET_Bind")) if (e instanceof java.net.BindException) System.out.println("*** Be sure to stop any other running instances of programs using this port!"); }