I don’t see why it wouldn’t work, assuming GetContacts is an async method:
public async Task<T> CheckForExceptionAsync<T>(Task<T> source)
{
try
{
return await source;
}
catch (Exception ex)
{
HandleException(ex);
return default(T);
}
}
On a side note, you should avoid async void (as I describe in my MSDN article) and end your async method names with the Async suffix.