title: ssl/asyncio: traceback even when error is handled
body: <p>Trying to download and process jpegs from URLs. My issue isn't that certificate verification fails for some URLs, as these URLs are old and may no longer be trustworthy, but that when I <code>try...except...</code> the <code>SSLCertVerificationError</code>, I still get the traceback.</p>
  
  <p>System:
  Linux 4.17.14-arch1-1-ARCH, python 3.7.0-3, aiohttp 3.3.2</p>
  
  <p>Minimal example:</p>
  
  <pre><code>import asyncio
  import aiohttp
  from ssl import SSLCertVerificationError
  
  async def fetch_url(url, client):
      try:
          async with client.get(url) as resp:
              print(resp.status)
              print(await resp.read())
      except SSLCertVerificationError as e:
          print('Error handled')
  
  async def main(urls):
      tasks = []
      async with aiohttp.ClientSession(loop=loop) as client:
          for url in urls:
              task = asyncio.ensure_future(fetch_url(url, client))
              tasks.append(task)
          return await asyncio.gather(*tasks)
  
  loop = asyncio.get_event_loop()
  loop.run_until_complete(main(['https://images.photos.com/']))
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>SSL handshake failed on verifying the certificate
  protocol: &lt;asyncio.sslproto.SSLProtocol object at 0x7ffbecad8ac8&gt;
  transport: &lt;_SelectorSocketTransport fd=6 read=polling write=&lt;idle, bufsize=0&gt;&gt;
  Traceback (most recent call last):
    File "/usr/lib/python3.7/asyncio/sslproto.py", line 625, in _on_handshake_complete
      raise handshake_exc
    File "/usr/lib/python3.7/asyncio/sslproto.py", line 189, in feed_ssldata
      self._sslobj.do_handshake()
    File "/usr/lib/python3.7/ssl.py", line 763, in do_handshake
      self._sslobj.do_handshake()
  ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for 'images.photos.com'. (_ssl.c:1045)
  SSL error in data received
  protocol: &lt;asyncio.sslproto.SSLProtocol object at 0x7ffbecad8ac8&gt;
  transport: &lt;_SelectorSocketTransport closing fd=6 read=idle write=&lt;idle, bufsize=0&gt;&gt;
  Traceback (most recent call last):
    File "/usr/lib/python3.7/asyncio/sslproto.py", line 526, in data_received
      ssldata, appdata = self._sslpipe.feed_ssldata(data)
    File "/usr/lib/python3.7/asyncio/sslproto.py", line 189, in feed_ssldata
      self._sslobj.do_handshake()
    File "/usr/lib/python3.7/ssl.py", line 763, in do_handshake
      self._sslobj.do_handshake()
  ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for 'images.photos.com'. (_ssl.c:1045)
  Error handled
  </code></pre>