Clean up connection error handling.

- Cleaned up tests.
- Add custom exceptions for SSL not supported and interrupt impossible.