This code wraps System.Threading.Tasks.Task (that has no return value), properly, so that cancellations and exceptions are preserved, and exceptions keep their stack-traces. It is to be used when the Task only denotes a single computation or value, as it only picks the first exception from the list of exceptions.
3 people like thisPosted: 11 years ago by haf