Skip to content
Snippets Groups Projects
Commit c4f2a59f authored by jonathanboron's avatar jonathanboron
Browse files

Homework 1 v5

parent 27751aaf
No related branches found
No related tags found
No related merge requests found
......@@ -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!");
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment