This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author yselivanov
Recipients ankostis, yselivanov
Date 2017-03-09.17:28:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1489080488.91.0.188681890456.issue29757@psf.upfronthosting.co.za>
In-reply-to
Content
> Case (c) sidesteps the above questions.

I like the (c) option. I don't think we should use logging/warnings here, as they can produce unwanted noise that few know how to silence.

When the list of errors is passed as a second argument to the exception, how is it rendered?  Would it make sense to concatenate all error messages:


  if errs:
      errors_msg = '  \n'.join(str(e) for e in errs)
      raise error(f"connection failed:\n{errors_msg}", errs)

Or maybe we should track which addr caused which exception?

  for res in getaddrinfo(host, port, 0, SOCK_STREAM):
      af, socktype, proto, canonname, sa = res
      try:
          ...
      except error as e:
          errs.append((canonname, e))
          ...

  if errs:
      error_msg = '  \n'.join(f'{addr}: {e}' for addr, e in errs)
      raise error('connection failed:\n{error_msg}', errs)
History
Date User Action Args
2017-03-09 17:28:08yselivanovsetrecipients: + yselivanov, ankostis
2017-03-09 17:28:08yselivanovsetmessageid: <1489080488.91.0.188681890456.issue29757@psf.upfronthosting.co.za>
2017-03-09 17:28:08yselivanovlinkissue29757 messages
2017-03-09 17:28:08yselivanovcreate