Handle socket-related exceptions.