if log_exceptions and not f.cancelled():
exception = f.exception()
if exception is not None:
+ logger.warning(
+ f'Future {id(f)} raised an unhandled exception and exited.'
+ )
logger.exception(exception)
- traceback.print_tb(exception.__traceback__)
+ raise exception
yield smart_future_by_real_future[f]
if callback is not None:
callback()
if not f.cancelled():
exception = f.exception()
if exception is not None:
+ logger.warning(
+ f'Future {id(f)} raised an unhandled exception and exited.'
+ )
logger.exception(exception)
- traceback.print_tb(exception.__traceback__)
+ raise exception
assert len(done) == len(real_futures)
assert len(not_done) == 0