Yury Selivanov added the comment:
> No, you are talking about *all* exceptions, since they all descend from
> BaseException. Python's normal __del__ handling just prints the ignored
> exception to stdout, even if it is a BaseException. Why should asyncio be
> different (other than logging it instead, which would be useful)?
My bad -- my current patch does indeed re-raise all exceptions. But would you
be OK with something like this:
def __del__():
...
try:
self._loop.call_exception_handler(context)
except Exception as ex:
# log or re-raise
logger.log(...)
except BaseException as ex:
logger.error(
'BaseException in Future.__del__, will be re-raised soon',
exc_info=True)
def throw():
raise ex
self._loop.call_soon(throw)
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue25489>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com