forked from goodboy/tractor
1
0
Fork 0

Log error

advanced_debugger_testing
Tyler Goodlet 2020-09-12 11:41:17 -04:00
parent f174aaf7d8
commit ce5ed631e0
1 changed files with 2 additions and 0 deletions

View File

@ -94,6 +94,8 @@ async def run_task(
""" """
nonlocal err nonlocal err
err = task.exception() err = task.exception()
if err:
log.exception("asyncio task errorred:")
cancel_scope.cancel() cancel_scope.cancel()
task.add_done_callback(cancel_trio) task.add_done_callback(cancel_trio)