Allows to handle exceptions in a LINQ async enumeration (invoking the given action if any when failing)
public static IEnumerable<Task<T>> WithExceptionHandling<T>(this IEnumerable<Task<T>> src,
Action<Exception> action = null)
where T : class| parameter | description |
|---|---|
| T | Items enumerable |
| src | Collection of tasks |
| action | Callback called when an exception is catched while enumerating |
The same enumeration, with exception handling added
- class TaskExtensions
- namespace Wokhan.Threading.Extensions