This is not possible because when the function is trycompleted, the task is not yet completed. There is no way to know if an exception will occur in the future or not.
The whole point of the task is to start asynchronous independent computing.
source
share