From c4f2a59fb52624165631232e3b4b4280096ee538 Mon Sep 17 00:00:00 2001
From: jonathanboron <jonathanboron@172.20.148.95>
Date: Thu, 18 Jul 2019 13:22:06 -0700
Subject: [PATCH] Homework 1 v5

---
 .../homework1/BoronTcpExample1Telnet1.java               | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/assignments/src/MV3500Cohort2019JulySeptember/homework1/BoronTcpExample1Telnet1.java b/assignments/src/MV3500Cohort2019JulySeptember/homework1/BoronTcpExample1Telnet1.java
index a38074ce5f..1f58d7a6a9 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!");
         }
     }
 }
-- 
GitLab