Message253557
> 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) |
|
Date |
User |
Action |
Args |
2015-10-27 17:37:28 | yselivanov | set | recipients:
+ yselivanov, gvanrossum, vstinner, r.david.murray, jinty |
2015-10-27 17:37:28 | yselivanov | set | messageid: <1445967448.69.0.27630794002.issue25489@psf.upfronthosting.co.za> |
2015-10-27 17:37:28 | yselivanov | link | issue25489 messages |
2015-10-27 17:37:28 | yselivanov | create | |
|