[issue29980] OSError: multiple exceptions should preserve the exception type if it is common

2020-11-25 Thread Christian Heimes


Christian Heimes  added the comment:

The feature request reminds me of 
https://github.com/python-trio/trio/issues/611. Nathaniel and Yury have been 
discussing the idea of a MultiError handler for a while.

--
nosy: +christian.heimes

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29980] OSError: multiple exceptions should preserve the exception type if it is common

2020-11-25 Thread Irit Katriel


Change by Irit Katriel :


--
nosy: +iritkatriel

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29980] OSError: multiple exceptions should preserve the exception type if it is common

2020-11-25 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy: +gvanrossum

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29980] OSError: multiple exceptions should preserve the exception type if it is common

2019-04-18 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
nosy: +nanjekyejoannah

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29980] OSError: multiple exceptions should preserve the exception type if it is common

2019-04-13 Thread Aymeric Augustin


Aymeric Augustin  added the comment:

A very similar issue came up here: 
https://github.com/aaugustin/websockets/issues/593

When raising an exception that gathers multiple sub-exceptions, it would be 
nice to be able to iterate the exception to access the sub-exceptions.

--
nosy: +aymeric.augustin

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29980] OSError: multiple exceptions should preserve the exception type if it is common

2017-04-07 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I agree.  And if the sub-exceptions are different, prepend them to the messages 
in the OSError list.

--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29980] OSError: multiple exceptions should preserve the exception type if it is common

2017-04-04 Thread R. David Murray

R. David Murray added the comment:

If all connections fail (not file :)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29980] OSError: multiple exceptions should preserve the exception type if it is common

2017-04-04 Thread R. David Murray

New submission from R. David Murray:

create_connection will try multiple times to connect if there are multiple 
addresses returned by getaddrinfo.  If all connections file it inspects the 
exceptions, and raises the first one if they are all equal.  But since the 
addresses are often different (else why would we try multiple times?), the 
messages will usually be different.  When the messages are different, the code 
raises an OSError with a list of the exceptions so the user can see them all.  
This, however, looses the information as to *what* kind of exception occurred 
(ie: ConnectioRefusedError, etc).

I propose that if all of the exceptions raised are of the same subclass, that 
that subclass be raised with the multi-message list, rather than the base 
OSError.

--
components: asyncio
messages: 291126
nosy: r.david.murray, yselivanov
priority: normal
severity: normal
status: open
title: OSError: multiple exceptions should preserve the exception type if it is 
common

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com