Skip to content
Snippets Groups Projects
Commit 93fd0ca2 authored by Brutzman, Don's avatar Brutzman, Don
Browse files

explicitly catch InterruptedException

parent f6e33e30
No related branches found
No related tags found
No related merge requests found
......@@ -26,8 +26,8 @@ public class TcpExample3Client {
* Program invocation, execution starts here
* @param args command-line arguments
*/
public static void main(String[] args) throws InterruptedException {
public static void main(String[] args)
{
// Local variables/fields
Socket socket = null;
InputStream is;
......@@ -69,7 +69,7 @@ public class TcpExample3Client {
} // end while(true) // infinite loops are dangerous, be sure to kill this process!
}
catch (IOException e)
catch (IOException | InterruptedException e )
{
System.err.println("Problem with " + TcpExample3Client.class.getName() + " networking:"); // describe what is happening
System.err.println("Error: " + e);
......
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