using System; using System.Threading.Tasks; namespace Firebase.Database.Extensions { public static class TaskExtensions { /// /// Instead of unwrapping it throws it as it is. /// public static async Task WithAggregateException(this Task source) { try { await source.ConfigureAwait(false); } catch (Exception ex) { throw source.Exception ?? ex; } } } }