Message289312
> 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) |
|
Date |
User |
Action |
Args |
2017-03-09 17:28:08 | yselivanov | set | recipients:
+ yselivanov, ankostis |
2017-03-09 17:28:08 | yselivanov | set | messageid: <1489080488.91.0.188681890456.issue29757@psf.upfronthosting.co.za> |
2017-03-09 17:28:08 | yselivanov | link | issue29757 messages |
2017-03-09 17:28:08 | yselivanov | create | |
|