Print SocketException if a socket can't be opened.