137 instantiations of AggregateException
dotnet-svcutil-lib (2)
Shared\Options\ApplicationOptions.cs (1)
154var ex = new AggregateException(options.Errors);
Tool.cs (1)
324var ex = new AggregateException(options.Errors.Select(e => e as ToolArgumentException ?? new ToolArgumentException(e.Message, e.InnerException)));
IIS.FunctionalTests (2)
src\Servers\IIS\IIS\test\Common.FunctionalTests\AspNetCorePortTests.cs (1)
180throw new AggregateException($"Unable to find unused random port after {retries} retries.", exceptions);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
154throw new AggregateException(exceptions);
IIS.LongTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
154throw new AggregateException(exceptions);
IIS.NewHandler.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
154throw new AggregateException(exceptions);
IIS.NewShim.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
154throw new AggregateException(exceptions);
IIS.ShadowCopy.Tests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
154throw new AggregateException(exceptions);
IIS.Tests (1)
Utilities\TestServer.cs (1)
227throw new AggregateException(exceptions);
IISExpress.FunctionalTests (2)
src\Servers\IIS\IIS\test\Common.FunctionalTests\AspNetCorePortTests.cs (1)
180throw new AggregateException($"Unable to find unused random port after {retries} retries.", exceptions);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
154throw new AggregateException(exceptions);
InMemory.FunctionalTests (1)
src\Shared\Buffers.MemoryPool\DiagnosticMemoryPool.cs (1)
150return new AggregateException("Exceptions occurred while accessing blocks", _blockAccessExceptions.ToArray());
Microsoft.AspNetCore.Authentication.JwtBearer (1)
JwtBearerHandler.cs (1)
184Exception = (validationFailures.Count == 1) ? validationFailures[0] : new AggregateException(validationFailures)
Microsoft.AspNetCore.Authentication.WsFederation (1)
WsFederationHandler.cs (1)
313throw new SecurityTokenException(Resources.Exception_NoTokenValidatorFound, new AggregateException(validationFailures));
Microsoft.AspNetCore.Components (2)
RenderTree\Renderer.cs (2)
1014HandleException(new AggregateException("Exceptions were encountered while disposing components.", exceptions)); 1263HandleException(new AggregateException("Exceptions were encountered while disposing components.", exceptions));
Microsoft.AspNetCore.Components.Server (4)
Circuits\CircuitHost.cs (4)
262throw new AggregateException("Encountered exceptions while executing circuit handlers.", exceptions); 292throw new AggregateException("Encountered exceptions while executing circuit handlers.", exceptions); 322throw new AggregateException("Encountered exceptions while executing circuit handlers.", exceptions); 350throw new AggregateException("Encountered exceptions while executing circuit handlers.", exceptions);
Microsoft.AspNetCore.DataProtection (1)
KeyManagement\DefaultKeyResolver.cs (1)
133_logger.KeyIsIneligibleToBeTheDefaultKeyBecauseItsMethodFailed(key.KeyId, nameof(IKey.CreateEncryptor), exceptions is null ? ex : new AggregateException(exceptions));
Microsoft.AspNetCore.Diagnostics (1)
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (1)
67error = new AggregateException(exceptions);
Microsoft.AspNetCore.Hosting (4)
GenericHost\GenericWebHostBuilder.cs (1)
162_hostingStartupErrors = new AggregateException(exceptions);
Internal\HostedServiceExecutor.cs (1)
45throw new AggregateException(exceptions);
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (1)
67error = new AggregateException(exceptions);
WebHostBuilder.cs (1)
255hostingStartupErrors = new AggregateException(exceptions);
Microsoft.AspNetCore.Http.Connections.Client (1)
HttpConnection.cs (1)
436throw new AggregateException("Unable to connect to the server with any of the available transports.", transportExceptions);
Microsoft.AspNetCore.Mvc.Core (1)
Infrastructure\ResourceInvoker.cs (1)
194return ValueTask.FromException(new AggregateException(releaseException, scopeException));
Microsoft.AspNetCore.RateLimiting (1)
DefaultCombinedLease.cs (1)
95throw new AggregateException(exceptions);
Microsoft.AspNetCore.Server.HttpSys (1)
src\Shared\Buffers.MemoryPool\DiagnosticMemoryPool.cs (1)
150return new AggregateException("Exceptions occurred while accessing blocks", _blockAccessExceptions.ToArray());
Microsoft.AspNetCore.Server.IIS (4)
Core\IISHttpContext.cs (2)
775_applicationException = new AggregateException(_applicationException, ex).Flatten(); 779_applicationException = new AggregateException(_applicationException, ex);
src\Shared\Buffers.MemoryPool\DiagnosticMemoryPool.cs (1)
150return new AggregateException("Exceptions occurred while accessing blocks", _blockAccessExceptions.ToArray());
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (1)
67error = new AggregateException(exceptions);
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (1)
IISDeployer.cs (1)
505throw new AggregateException($"Operation did not succeed after {retryCount} retries, serverManagerConfig: {DumpServerManagerConfig()}", exceptions.ToArray());
Microsoft.AspNetCore.Server.Kestrel.Core (3)
Internal\Http\HttpProtocol.cs (2)
1456_applicationException = new AggregateException(_applicationException, ex).Flatten(); 1460_applicationException = new AggregateException(_applicationException, ex);
LocalhostListenOptions.cs (1)
63throw new IOException(CoreStrings.FormatAddressBindingFailed(GetDisplayName()), new AggregateException(exceptions));
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
src\Shared\Buffers.MemoryPool\DiagnosticMemoryPool.cs (1)
150return new AggregateException("Exceptions occurred while accessing blocks", _blockAccessExceptions.ToArray());
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (1)
src\Shared\Buffers.MemoryPool\DiagnosticMemoryPool.cs (1)
150return new AggregateException("Exceptions occurred while accessing blocks", _blockAccessExceptions.ToArray());
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (1)
src\Shared\Buffers.MemoryPool\DiagnosticMemoryPool.cs (1)
150return new AggregateException("Exceptions occurred while accessing blocks", _blockAccessExceptions.ToArray());
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
src\Shared\Buffers.MemoryPool\DiagnosticMemoryPool.cs (1)
150return new AggregateException("Exceptions occurred while accessing blocks", _blockAccessExceptions.ToArray());
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (1)
src\Shared\Buffers.MemoryPool\DiagnosticMemoryPool.cs (1)
150return new AggregateException("Exceptions occurred while accessing blocks", _blockAccessExceptions.ToArray());
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (1)
67error = new AggregateException(exceptions);
Microsoft.Build (4)
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (1)
284throw new AggregateException(deactivateExceptions);
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (1)
259ErrorUtilities.ThrowInternalError("Cannot acquire required number of nodes.", new AggregateException(exceptions.ToArray()));
Graph\ParallelWorkSet.cs (2)
63throw new AggregateException(_exceptions); 157throw new AggregateException(_exceptions);
Microsoft.Build.Engine.UnitTests (7)
BackEnd\EventSourceSink_Tests.cs (7)
183throw new AggregateException(); 194throw new AggregateException(exceptionArray); 205AggregateException ae1 = new AggregateException(exceptionArray1); 208throw new AggregateException(exceptionArray2); 229throw new AggregateException(exceptionArray); 240AggregateException ae1 = new AggregateException(exceptionArray1); 243throw new AggregateException(exceptionArray2);
Microsoft.Build.UnitTests.Shared (1)
DummyMappedDrive.cs (1)
68e = e == null ? exc : new AggregateException(e, exc);
Microsoft.Build.Utilities.UnitTests (1)
TaskLoggingHelper_Tests.cs (1)
297AggregateException aggregateException = new AggregateException(
Microsoft.CodeAnalysis.CSharp.EndToEnd.UnitTests (1)
EndToEndTests.cs (1)
218e = new AggregateException(e, innerException);
Microsoft.CodeAnalysis.Features.UnitTests (1)
FindUsages\DefinitionItemFactoryTests.cs (1)
106throw new AggregateException(failures);
Microsoft.CodeAnalysis.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\MefLanguageServices.cs (1)
75throw new AggregateException(CompilerExtensionsResources.Instantiated_parts_threw_exceptions_from_IDisposable_Dispose, exceptions);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\MefWorkspaceServices.cs (1)
98throw new AggregateException(CompilerExtensionsResources.Instantiated_parts_threw_exceptions_from_IDisposable_Dispose, exceptions);
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
Rpc\RpcClient.cs (1)
68throw new AggregateException(message, ex);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
MEF\UseExportProviderAttribute.cs (1)
169throw new AggregateException("Tests threw unexpected exceptions", exceptions);
Microsoft.DotNet.NuGetRepack.Tasks (1)
src\NuGetVersionUpdater.cs (1)
394throw new AggregateException(exceptions.ToArray());
Microsoft.Extensions.AI (1)
ChatCompletion\FunctionInvokingChatClient.cs (1)
656throw new AggregateException(allExceptionsArray);
Microsoft.Extensions.AI.Evaluation.Console.Tests (18)
ExceptionUtilitiesTests.cs (18)
41var exception = new AggregateException(new OperationCanceledException()); 49var exception = new AggregateException(new TaskCanceledException()); 58new AggregateException( 69var exception = new AggregateException(); 77var exception = new AggregateException(new InvalidOperationException(), new ArgumentException()); 85var exception = new AggregateException(new OperationCanceledException(), new InvalidOperationException()); 94new AggregateException( 99var exception2 = new AggregateException(new TaskCanceledException(), exception1); 107var exception1 = new AggregateException(new TaskCanceledException(), new InvalidOperationException()); 108var exception2 = new AggregateException(new TaskCanceledException(), exception1); 116var exception1 = new AggregateException(); 117var exception2 = new AggregateException(exception1); 125var exception1 = new AggregateException(new TaskCanceledException(), new OperationCanceledException()); 126var exception2 = new AggregateException(new OperationCanceledException()); 127var exception3 = new AggregateException(exception1, exception2, new TaskCanceledException()); 135var exception1 = new AggregateException(new TaskCanceledException(), new OperationCanceledException()); 136var exception2 = new AggregateException(new InvalidOperationException(), new OperationCanceledException()); 137var exception3 = new AggregateException(exception1, exception2, new TaskCanceledException());
Microsoft.Extensions.DependencyInjection (1)
ServiceProvider.cs (1)
91throw new AggregateException("Some services are not able to be constructed", exceptions.ToArray());
Microsoft.Extensions.Hosting (2)
Internal\Host.cs (2)
163var ex = new AggregateException("One or more hosted services failed to start.", exceptions); 297var ex = new AggregateException("One or more hosted services failed to stop.", exceptions);
Microsoft.Extensions.Logging (1)
Logger.cs (1)
157throw new AggregateException(
Microsoft.Extensions.Options (1)
ValidateOnStart.cs (1)
49throw new AggregateException(exceptions);
Microsoft.Extensions.Options.Contextual (1)
Internal\ContextualOptionsFactory.cs (1)
122throw new AggregateException(loadExceptions);
Microsoft.Extensions.Telemetry (1)
Logging\ExtendedLogger.cs (1)
142LoggingEventSource.Instance.LoggingException(new AggregateException("An error occurred while logging.", exceptions));
Microsoft.Extensions.Telemetry.Tests (1)
Logging\ExtendedLoggerTests.cs (1)
480throw new AggregateException("EM4", exceptions);
Microsoft.ML.AutoML.Tests (1)
AutoFitTests.cs (1)
572throw new AggregateException(ignoredExceptions);
Microsoft.ML.TensorFlow (1)
TensorflowUtils.cs (1)
605throw new AggregateException(statusException, ex);
Microsoft.ML.Tokenizers.Data.Tests (2)
src\Common\tests\RetryHelper.cs (2)
54throw new AggregateException(exceptions); 102throw new AggregateException(exceptions);
Microsoft.ML.Tokenizers.Tests (2)
src\Common\tests\RetryHelper.cs (2)
54throw new AggregateException(exceptions); 102throw new AggregateException(exceptions);
Sockets.BindTests (1)
src\Servers\Kestrel\test\BindTests\AddressRegistrationTests.cs (1)
297throw new AggregateException(errors);
System.ComponentModel.Composition (2)
System\ComponentModel\Composition\Hosting\AtomicComposition.cs (2)
179throw new InvalidOperationException(SR.InvalidOperation_RevertAndCompleteActionsMustNotThrow, new AggregateException(exceptions)); 214throw new InvalidOperationException(SR.InvalidOperation_RevertAndCompleteActionsMustNotThrow, new AggregateException(exceptions));
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\Metrics\MeterListener.cs (1)
240throw new AggregateException(exceptionsList);
System.Diagnostics.Process (1)
System\Diagnostics\Process.NonUap.cs (1)
31throw new AggregateException(SR.KillEntireProcessTree_TerminationIncomplete, result);
System.IO.Pipelines (1)
System\IO\Pipelines\PipeCompletionCallbacks.cs (1)
38throw new AggregateException(exceptions);
System.Linq.Parallel (8)
System\Linq\Parallel\QueryOperators\AssociativeAggregationOperator.cs (2)
132throw new AggregateException(ex); 165throw new AggregateException(ex);
System\Linq\Parallel\QueryOperators\Inlined\InlinedAggregationOperator.cs (1)
78throw new AggregateException(ex);
System\Linq\Parallel\Utils\ExceptionAggregator.cs (1)
107throw new AggregateException(ex);
System\Linq\ParallelEnumerable.cs (4)
1580throw new AggregateException(e); 1714throw new AggregateException(e); 4983throw new AggregateException(ex); 5080throw new AggregateException(ex);
System.Net.NetworkInformation (1)
System\Net\NetworkInformation\UnixIPGlobalProperties.cs (1)
116throw new NetworkInformationException(SR.net_PInvokeError, new AggregateException(context._exceptions));
System.Net.WebSockets (1)
System\Net\WebSockets\ManagedWebSocket.cs (1)
1026new AggregateException(_keepAlivePingState.Exception, exc));
System.Private.CoreLib (9)
src\libraries\System.Private.CoreLib\src\System\AggregateException.cs (2)
281throw new AggregateException(Message, unhandledExceptions.ToArray(), cloneExceptions: false); 335return new AggregateException(GetType() == typeof(AggregateException) ? base.Message : Message, flattenedExceptions.ToArray(), cloneExceptions: false);
src\libraries\System.Private.CoreLib\src\System\Threading\CancellationTokenSource.cs (1)
839throw new AggregateException(exceptionList);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (2)
1853return new AggregateException(canceledException); 1917edi = ExceptionDispatchInfo.Capture(new AggregateException(exception, postException));
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskExceptionHolder.cs (3)
64AggregateException exceptionToThrow = new AggregateException( 264return new AggregateException(exceptions); 274return new AggregateException(combinedExceptions);
src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (1)
494throw new AggregateException(exceptions);
System.Threading.RateLimiting (6)
System\Threading\RateLimiting\ChainedRateLimiter.cs (2)
166throw new AggregateException(exceptions); 204return new AggregateException(exceptions);
System\Threading\RateLimiting\CombinedRateLimitLease.cs (1)
94throw new AggregateException(exceptions);
System\Threading\RateLimiting\DefaultPartitionedRateLimiter.cs (3)
145throw new AggregateException(exceptions); 180throw new AggregateException(exceptions); 284throw new AggregateException(aggregateExceptions);
System.Threading.Tasks.Dataflow (1)
Blocks\BatchBlock.cs (1)
1107if (exceptions != null) throw new AggregateException(exceptions);
System.Threading.Tasks.Parallel (2)
System\Threading\Tasks\Parallel.cs (1)
326new AggregateException(exceptionQ));
System\Threading\Tasks\TaskReplicator.cs (1)
158throw new AggregateException(replicator._exceptions);
System.Windows.Forms.Primitives.TestUtilities (1)
Extensions\AssertExtensions.cs (1)
124throw new AggregateException($"Result: {resultStr}", ex);
Templates.Blazor.Tests (1)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
87throw new AggregateException(list);
Templates.Blazor.WebAssembly.Auth.Tests (1)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
87throw new AggregateException(list);
Templates.Blazor.WebAssembly.Tests (1)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
87throw new AggregateException(list);
Templates.Mvc.Tests (1)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
87throw new AggregateException(list);
Templates.Tests (1)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
87throw new AggregateException(list);
492 references to AggregateException
Aspire.Hosting.Tests (4)
DistributedApplicationRunnerTests.cs (2)
22var ex = Assert.Throws<AggregateException>(app.Run);
DistributedApplicationTests.cs (2)
315var ex = Assert.Throws<AggregateException>(testProgram.Run);
ClientSample (1)
RawSample.cs (1)
62catch (AggregateException aex) when (aex.InnerExceptions.All(e => e is OperationCanceledException))
Crossgen2Tasks (1)
CommonFilePulledFromSdkRepo\TaskBase.cs (1)
60if (e is AggregateException aggregate)
dotnet-openapi (1)
Application.cs (1)
61catch (AggregateException ex) when (ex.InnerException != null)
dotnet-svcutil-lib (21)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\ExceptionTrace.cs (8)
44AggregateException aggregateException = exception as AggregateException; 63AggregateException aggregateException = exception as AggregateException; 102public Exception AsError<TPreferredException>(AggregateException aggregateException) 109/// from the <see cref="AggregateException"/> if one is present. 119/// <param name="aggregateException">The <see cref="AggregateException"/> to examine.</param> 123public Exception AsError<TPreferredException>(AggregateException aggregateException, string eventSource)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\Fx.cs (2)
200else if (exception is AggregateException) 205ReadOnlyCollection<Exception> innerExceptions = ((AggregateException)exception).InnerExceptions;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\WebSocketHelper.cs (3)
145AggregateException aggregationException = ex as AggregateException; 176internal static Exception ConvertAggregateExceptionToCommunicationException(AggregateException ex)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\WebSocketTransportDuplexSessionChannel.cs (2)
612catch (AggregateException ex) 779catch (AggregateException ex)
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\TaskMethodInvoker.cs (1)
77AggregateException ae = null;
Shared\Options\ApplicationOptions.cs (1)
154var ex = new AggregateException(options.Errors);
Shared\Utilities\Utilities.cs (1)
41if (!(e is AggregateException) && !string.IsNullOrWhiteSpace(exMsg) && !message.ToString().Contains(exMsg))
Tool.cs (3)
324var ex = new AggregateException(options.Errors.Select(e => e as ToolArgumentException ?? new ToolArgumentException(e.Message, e.InnerException))); 342var agex = ex as AggregateException;
GetDocument.Insider (1)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-preview.5.25256.101\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (1)
289catch (AggregateException) when (_hostTcs.Task.IsCompleted)
InMemory.FunctionalTests (1)
src\Shared\Buffers.MemoryPool\DiagnosticMemoryPool.cs (1)
148private AggregateException CreateAccessExceptions()
Microsoft.AspNetCore.Authentication.JwtBearer (1)
JwtBearerHandler.cs (1)
372if (authFailure is AggregateException agEx)
Microsoft.AspNetCore.Components.Authorization.Tests (2)
src\Components\Shared\test\AutoRenderComponent.cs (1)
34while (exception is AggregateException e)
src\Components\Shared\test\TestRenderer.cs (1)
86while (exception is AggregateException e)
Microsoft.AspNetCore.Components.Endpoints.Tests (2)
ImportMapTest.cs (1)
319while (exception is AggregateException e)
src\Components\Shared\test\AutoRenderComponent.cs (1)
34while (exception is AggregateException e)
Microsoft.AspNetCore.Components.Forms.Tests (2)
src\Components\Shared\test\AutoRenderComponent.cs (1)
34while (exception is AggregateException e)
src\Components\Shared\test\TestRenderer.cs (1)
86while (exception is AggregateException e)
Microsoft.AspNetCore.Components.Server (1)
Circuits\RemoteRenderer.cs (1)
117if (exception is AggregateException aggregateException)
Microsoft.AspNetCore.Components.Server.Tests (2)
Circuits\CircuitHostTest.cs (2)
284var aex = Assert.IsType<AggregateException>(reportedErrors.Single().ExceptionObject);
Microsoft.AspNetCore.Components.Tests (7)
RendererTest.cs (5)
2301var aex = Assert.IsType<AggregateException>(Assert.Single(renderer.HandledExceptions)); 4257var aex = Assert.IsType<AggregateException>(Assert.Single(renderer.HandledExceptions)); 5212while (exception is AggregateException e)
src\Components\Shared\test\AutoRenderComponent.cs (1)
34while (exception is AggregateException e)
src\Components\Shared\test\TestRenderer.cs (1)
86while (exception is AggregateException e)
Microsoft.AspNetCore.Components.Web.Tests (2)
src\Components\Shared\test\AutoRenderComponent.cs (1)
34while (exception is AggregateException e)
src\Components\Shared\test\TestRenderer.cs (1)
86while (exception is AggregateException e)
Microsoft.AspNetCore.Components.WebAssembly (1)
Rendering\WebAssemblyRenderer.cs (1)
174if (exception is AggregateException aggregateException)
Microsoft.AspNetCore.Diagnostics (3)
src\Shared\StackTrace\ExceptionDetails\ExceptionDetailsProvider.cs (2)
41var stackFrames = StackTraceHelper.GetFrames(original, out var exception) 73if (ex is AggregateException aggregateException)
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (1)
21public static IList<StackFrameInfo> GetFrames(Exception exception, out AggregateException? error)
Microsoft.AspNetCore.Hosting (9)
GenericHost\GenericWebHostBuilder.cs (1)
26private AggregateException? _hostingStartupErrors;
GenericHost\GenericWebHostServiceOptions.cs (1)
14public AggregateException? HostingStartupExceptions { get; set; }
Internal\WebHost.cs (2)
34private readonly AggregateException? _hostingStartupErrors; 53AggregateException? hostingStartupErrors)
src\Shared\StackTrace\ExceptionDetails\ExceptionDetailsProvider.cs (2)
41var stackFrames = StackTraceHelper.GetFrames(original, out var exception) 73if (ex is AggregateException aggregateException)
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (1)
21public static IList<StackFrameInfo> GetFrames(Exception exception, out AggregateException? error)
WebHostBuilder.cs (2)
137var hostingServices = BuildCommonServices(out var hostingStartupErrors); 216private IServiceCollection BuildCommonServices(out AggregateException? hostingStartupErrors)
Microsoft.AspNetCore.Hosting.Tests (2)
WebHostBuilderTests.cs (2)
1357if (stopEx is AggregateException aggregateException) 1383if (stopEx is AggregateException aggregateException)
Microsoft.AspNetCore.Http.Extensions.Tests (1)
ValidationsGenerator\ValidationsGeneratorTestBase.cs (1)
472catch (AggregateException) when (_hostTcs.Task.IsCompleted)
Microsoft.AspNetCore.InternalTesting (1)
ExceptionAssertions.cs (1)
241return exception is AggregateException aggEx ? aggEx.GetBaseException() : exception;
Microsoft.AspNetCore.Mvc.Testing (1)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-preview.5.25256.101\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (1)
289catch (AggregateException) when (_hostTcs.Task.IsCompleted)
Microsoft.AspNetCore.OpenApi.SourceGenerators.Tests (1)
SnapshotTestHelper.cs (1)
480catch (AggregateException) when (_hostTcs.Task.IsCompleted)
Microsoft.AspNetCore.Routing.Tests (2)
Matching\DataSourceDependentMatcherTest.cs (2)
225var exception = Assert.Throws<AggregateException>(
Microsoft.AspNetCore.Server.HttpSys (2)
NativeInterop\DisconnectListener.cs (1)
77catch (AggregateException exception)
src\Shared\Buffers.MemoryPool\DiagnosticMemoryPool.cs (1)
148private AggregateException CreateAccessExceptions()
Microsoft.AspNetCore.Server.IIS (5)
Core\IISHttpContext.cs (1)
773else if (_applicationException is AggregateException)
src\Shared\Buffers.MemoryPool\DiagnosticMemoryPool.cs (1)
148private AggregateException CreateAccessExceptions()
src\Shared\StackTrace\ExceptionDetails\ExceptionDetailsProvider.cs (2)
41var stackFrames = StackTraceHelper.GetFrames(original, out var exception) 73if (ex is AggregateException aggregateException)
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (1)
21public static IList<StackFrameInfo> GetFrames(Exception exception, out AggregateException? error)
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\Http\HttpProtocol.cs (1)
1454else if (_applicationException is AggregateException)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (5)
DiagnosticMemoryPoolTests.cs (4)
197var aggregateException = await Assert.ThrowsAsync<AggregateException>(async () => await memoryPool.WhenAllBlocksReturnedAsync(TimeSpan.FromSeconds(5))); 223var exception = Assert.Throws<AggregateException>(() => memoryPool.Dispose());
src\Shared\Buffers.MemoryPool\DiagnosticMemoryPool.cs (1)
148private AggregateException CreateAccessExceptions()
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (1)
src\Shared\Buffers.MemoryPool\DiagnosticMemoryPool.cs (1)
148private AggregateException CreateAccessExceptions()
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (1)
src\Shared\Buffers.MemoryPool\DiagnosticMemoryPool.cs (1)
148private AggregateException CreateAccessExceptions()
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
src\Shared\Buffers.MemoryPool\DiagnosticMemoryPool.cs (1)
148private AggregateException CreateAccessExceptions()
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (1)
src\Shared\Buffers.MemoryPool\DiagnosticMemoryPool.cs (1)
148private AggregateException CreateAccessExceptions()
Microsoft.AspNetCore.Shared.Tests (5)
ObjectMethodExecutorTest.cs (4)
372var exception = await Assert.ThrowsAsync<AggregateException>(async () => await resultTask); 405var exception = await Assert.ThrowsAsync<AggregateException>(async () => await resultTask);
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (1)
21public static IList<StackFrameInfo> GetFrames(Exception exception, out AggregateException? error)
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (2)
HubConnectionTests.cs (2)
1896var ex = await Assert.ThrowsAsync<AggregateException>(() => hubConnection.StartAsync().DefaultTimeout());
Microsoft.AspNetCore.SignalR.Client.Tests (10)
HttpConnectionTests.ConnectionLifecycle.cs (9)
157var ex = await Assert.ThrowsAsync<AggregateException>(() => connection.StartAsync()).DefaultTimeout(); 346await Assert.ThrowsAsync<AggregateException>( 447var ex = await Assert.ThrowsAsync<AggregateException>(async () => await connection.StartAsync(cts.Token)).DefaultTimeout(); 504var ex = await Assert.ThrowsAsync<AggregateException>(async () => await connection.StartAsync()).DefaultTimeout(); 530var ex = await Assert.ThrowsAsync<AggregateException>(async () => await connection.StartAsync(cts.Token).DefaultTimeout());
HttpConnectionTests.Negotiate.cs (1)
49return RunInvalidNegotiateResponseTest<AggregateException>(ResponseUtils.CreateNegotiationContent(transportTypes: HttpTransportType.ServerSentEvents),
Microsoft.AspNetCore.TestHost (1)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-preview.5.25256.101\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (1)
289catch (AggregateException) when (_hostTcs.Task.IsCompleted)
Microsoft.Build (12)
BackEnd\BuildManager\BuildManager.cs (4)
1061if (e is AggregateException ae && ae.InnerExceptions.Count == 1) 1733if (ex is AggregateException ae) 2507catch (AggregateException ex) when (ex.InnerExceptions.All(inner => inner is OperationCanceledException)) 2856if (e is AggregateException ae && ae.InnerExceptions.Count == 1)
BackEnd\Components\RequestBuilder\RequestBuilder.cs (2)
296catch (AggregateException e) when (InnerExceptionsAreAllCancelledExceptions(e)) 313private bool InnerExceptionsAreAllCancelledExceptions(AggregateException e)
ExceptionHandling.cs (2)
123var aggregateException = e as AggregateException;
FileMatcher.cs (2)
2581catch (AggregateException ex) when (InnerExceptionsAreAllIoRelated(ex)) 2615private bool InnerExceptionsAreAllIoRelated(AggregateException ex)
Graph\ProjectGraph.cs (1)
182/// <exception cref="AggregateException">
TaskLoggingHelper.cs (1)
934if (exception is AggregateException aggregateException)
Microsoft.Build.Engine.OM.UnitTests (2)
ExceptionHandling.cs (2)
123var aggregateException = e as AggregateException;
Microsoft.Build.Engine.UnitTests (11)
BackEnd\BuildManager_Tests.cs (2)
4255AggregateException aggException = result.Exception.ShouldBeOfType<AggregateException>();
BackEnd\EventSourceSink_Tests.cs (2)
205AggregateException ae1 = new AggregateException(exceptionArray1); 240AggregateException ae1 = new AggregateException(exceptionArray1);
Graph\GraphLoadedFromSolution_tests.cs (2)
82var aggException = Should.Throw<AggregateException>(() => new ProjectGraph(root.Path));
Graph\ParallelWorkSet_Tests.cs (1)
267Should.Throw<AggregateException>(() => _workSet.WaitForAllWorkAndComplete()).InnerExceptions.ShouldBeSetEquivalentTo(observedExceptions);
Graph\ProjectGraph_Tests.cs (4)
207var aggException = Should.Throw<AggregateException>(() => new ProjectGraph( 563var aggException = Should.Throw<AggregateException>(() => new ProjectGraph(entryProject.Path));
Microsoft.Build.Tasks.Core (5)
DownloadFile.cs (1)
244if (actualException is AggregateException aggregateException && aggregateException.InnerException != null)
ExceptionHandling.cs (2)
123var aggregateException = e as AggregateException;
FileMatcher.cs (2)
2581catch (AggregateException ex) when (InnerExceptionsAreAllIoRelated(ex)) 2615private bool InnerExceptionsAreAllIoRelated(AggregateException ex)
Microsoft.Build.Utilities.Core (5)
ExceptionHandling.cs (2)
123var aggregateException = e as AggregateException;
FileMatcher.cs (2)
2581catch (AggregateException ex) when (InnerExceptionsAreAllIoRelated(ex)) 2615private bool InnerExceptionsAreAllIoRelated(AggregateException ex)
TaskLoggingHelper.cs (1)
934if (exception is AggregateException aggregateException)
Microsoft.Build.Utilities.UnitTests (1)
TaskLoggingHelper_Tests.cs (1)
297AggregateException aggregateException = new AggregateException(
Microsoft.CodeAnalysis (4)
InternalUtilities\FailFast.cs (1)
35if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1)
InternalUtilities\FatalError.cs (1)
268if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
src\Compilers\Core\AnalyzerDriver\AnalyzerExceptionDescriptionBuilder.cs (2)
20if (exception is AggregateException aggregateException) 22var flattened = aggregateException.Flatten();
Microsoft.CodeAnalysis.CodeStyle (6)
src\Compilers\Core\Portable\InternalUtilities\FailFast.cs (1)
35if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1)
src\Compilers\Core\Portable\InternalUtilities\FatalError.cs (1)
268if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectReader.cs (1)
71catch (AggregateException ex) when (ex.InnerException is not null)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (1)
519catch (AggregateException ae)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (2)
54catch (AggregateException ex) 73var exception = task.Exception!;
Microsoft.CodeAnalysis.EditorFeatures (2)
LanguageServer\AbstractInProcLanguageClient.cs (1)
185catch (AggregateException e)
Shared\Utilities\ThreadingContext.cs (1)
88catch (AggregateException ex)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
CodeGeneration\CodeGenerationTests.CSharp.cs (1)
1333await Assert.ThrowsAsync<AggregateException>(async () =>
CodeGeneration\CodeGenerationTests.VisualBasic.cs (1)
1399await Assert.ThrowsAsync<AggregateException>(async () =>
Utilities\AsynchronousOperationListenerTests.cs (1)
45catch (AggregateException e)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (2)
src\Compilers\Core\Portable\InternalUtilities\FailFast.cs (1)
35if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1)
src\Compilers\Core\Portable\InternalUtilities\FatalError.cs (1)
268if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (2)
src\Compilers\Core\Portable\InternalUtilities\FailFast.cs (1)
35if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1)
src\Compilers\Core\Portable\InternalUtilities\FatalError.cs (1)
268if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
Microsoft.CodeAnalysis.Features (6)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.cs (1)
127catch (AggregateException ae)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingIncrementalAnalyzerProcessor.cs (3)
223catch (AggregateException e) when (ReportWithoutCrashUnlessAllCanceledAndPropagate(e)) 233static bool ReportWithoutCrashUnlessAllCanceledAndPropagate(AggregateException aggregate) 235var flattened = aggregate.Flatten();
src\Compilers\Core\AnalyzerDriver\AnalyzerExceptionDescriptionBuilder.cs (2)
20if (exception is AggregateException aggregateException) 22var flattened = aggregateException.Flatten();
Microsoft.CodeAnalysis.InteractiveHost (4)
src\Compilers\Core\Portable\InternalUtilities\FailFast.cs (1)
35if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1)
src\Compilers\Core\Portable\InternalUtilities\FatalError.cs (1)
268if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (2)
54catch (AggregateException ex) 73var exception = task.Exception!;
Microsoft.CodeAnalysis.LanguageServer (1)
Logging\RoslynLogger.cs (1)
67if (exception is AggregateException aggregateException)
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
src\VisualStudio\Core\Def\Watson\FaultReporter.cs (1)
119if (exception is AggregateException aggregateException)
Microsoft.CodeAnalysis.Threading.Package (1)
src\Compilers\Core\Portable\InternalUtilities\FatalError.cs (1)
268if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
Microsoft.CodeAnalysis.Workspaces (5)
src\Compilers\Core\Portable\InternalUtilities\FailFast.cs (1)
35if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1)
src\Compilers\Core\Portable\InternalUtilities\FatalError.cs (1)
268if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectReader.cs (1)
71catch (AggregateException ex) when (ex.InnerException is not null)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (2)
54catch (AggregateException ex) 73var exception = task.Exception!;
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
src\Compilers\Core\Portable\InternalUtilities\FailFast.cs (1)
35if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1)
src\Compilers\Core\Portable\InternalUtilities\FatalError.cs (1)
268if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
Microsoft.CodeAnalysis.Workspaces.UnitTests (3)
UtilityTest\AsyncLazyTests.cs (1)
216catch (AggregateException ex)
UtilityTest\CancellationSeriesTests.cs (2)
126var aggregateException = Assert.Throws<AggregateException>(() => series.CreateNext());
Microsoft.DotNet.Arcade.Sdk (1)
src\DownloadFile.cs (1)
163catch (AggregateException e)
Microsoft.DotNet.Build.Tasks.Installers (1)
src\ExecWithRetries.cs (1)
107catch (AggregateException e) when (e.InnerException is TaskCanceledException)
Microsoft.DotNet.NuGetRepack.Tasks (1)
src\UpdatePackageVersionTask.cs (1)
94catch (AggregateException e)
Microsoft.DotNet.NuGetRepack.Tests (6)
VersionUpdaterTests.cs (6)
141var e2 = Assert.Throws<AggregateException>(() => NuGetVersionUpdater.Run(new[] { a_daily }, outDirectoryOpt: null, VersionTranslation.Release, exactVersions: false)); 149var e3 = Assert.Throws<AggregateException>(() => NuGetVersionUpdater.Run(new[] { a_daily, b_daily }, outDirectoryOpt: null, VersionTranslation.Release, exactVersions: false)); 156var e4 = Assert.Throws<AggregateException>(() => NuGetVersionUpdater.Run(new[] { a_daily, c_daily }, outDirectoryOpt: null, VersionTranslation.Release, exactVersions: false));
Microsoft.Extensions.AI (1)
ChatCompletion\FunctionInvokingChatClient.cs (1)
637/// <exception cref="AggregateException">Thrown if the maximum consecutive error count is exceeded.</exception>
Microsoft.Extensions.AI.Evaluation.Console (3)
Utilities\ExceptionUtilities.cs (3)
15AggregateException aggregateException => aggregateException.ContainsOnlyCancellations(), 19private static bool ContainsOnlyCancellations(this AggregateException exception) 32if (current is AggregateException aggregateException)
Microsoft.Extensions.AI.Evaluation.Console.Tests (18)
ExceptionUtilitiesTests.cs (18)
41var exception = new AggregateException(new OperationCanceledException()); 49var exception = new AggregateException(new TaskCanceledException()); 57var exception = 69var exception = new AggregateException(); 77var exception = new AggregateException(new InvalidOperationException(), new ArgumentException()); 85var exception = new AggregateException(new OperationCanceledException(), new InvalidOperationException()); 93var exception1 = 99var exception2 = new AggregateException(new TaskCanceledException(), exception1); 107var exception1 = new AggregateException(new TaskCanceledException(), new InvalidOperationException()); 108var exception2 = new AggregateException(new TaskCanceledException(), exception1); 116var exception1 = new AggregateException(); 117var exception2 = new AggregateException(exception1); 125var exception1 = new AggregateException(new TaskCanceledException(), new OperationCanceledException()); 126var exception2 = new AggregateException(new OperationCanceledException()); 127var exception3 = new AggregateException(exception1, exception2, new TaskCanceledException()); 135var exception1 = new AggregateException(new TaskCanceledException(), new OperationCanceledException()); 136var exception2 = new AggregateException(new InvalidOperationException(), new OperationCanceledException()); 137var exception3 = new AggregateException(exception1, exception2, new TaskCanceledException());
Microsoft.Extensions.AI.Tests (3)
ChatCompletion\FunctionInvokingChatClientTests.cs (3)
307var ex = await Assert.ThrowsAsync<AggregateException>(() => 313ex = await Assert.ThrowsAsync<AggregateException>(() =>
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (1)
Windows\WindowsCountersTests.cs (1)
99Assert.Throws<AggregateException>(() =>
Microsoft.Extensions.Hosting (2)
Internal\Host.cs (2)
163var ex = new AggregateException("One or more hosted services failed to start.", exceptions); 297var ex = new AggregateException("One or more hosted services failed to stop.", exceptions);
Microsoft.Extensions.Hosting.Testing.Tests (4)
FakeHostBuilderTests.cs (4)
137Assert.IsType<AggregateException>(exception); 139((AggregateException)exception).InnerExceptions, 169Assert.IsType<AggregateException>(exception); 171((AggregateException)exception).InnerExceptions,
Microsoft.Extensions.Http.Resilience.Tests (1)
Routing\RoutingStrategyTest.cs (1)
128Assert.Throws<AggregateException>(() => provider.Reload([]));
Microsoft.Extensions.Logging.AzureAppServices (1)
BatchingLoggerProvider.cs (1)
177catch (AggregateException ex) when (ex.InnerExceptions.Count == 1 && ex.InnerExceptions[0] is TaskCanceledException)
Microsoft.Extensions.Options.Contextual.Tests (2)
ContextualOptionsFactoryTests.cs (2)
222var exception = await Assert.ThrowsAsync<AggregateException>(async () => await sut.CreateAsync(string.Empty, Mock.Of<IOptionsContext>(), default)); 247var exception = await Assert.ThrowsAsync<AggregateException>(async () => await sut.CreateAsync(string.Empty, Mock.Of<IOptionsContext>(), default));
Microsoft.Extensions.Telemetry (1)
Logging\ExtendedLogger.cs (1)
208if (exception is AggregateException aggregateException)
Microsoft.Extensions.Telemetry.Tests (1)
Logging\ExtendedLoggerTests.cs (1)
482catch (AggregateException e)
Microsoft.JSInterop.Tests (2)
JSRuntimeTest.cs (2)
201var exception = Assert.IsType<AggregateException>(task.AsTask().Exception);
Microsoft.ML.AutoML (1)
Experiment\Experiment.cs (1)
202catch (AggregateException e)
Microsoft.ML.AutoML.Tests (2)
AutoFitTests.cs (2)
559catch (AggregateException ae) 666if (lastException is AggregateException lastAggregateException)
Microsoft.VisualStudio.LanguageServices (3)
ErrorReporting\VisualStudioErrorReportingService.ExceptionFormatting.cs (2)
22if (exception is AggregateException aggregate) 35private static string GetStackForAggregateException(Exception exception, AggregateException aggregate)
Watson\FaultReporter.cs (1)
119if (exception is AggregateException aggregateException)
MSBuild (3)
ExceptionHandling.cs (2)
123var aggregateException = e as AggregateException;
XMake.cs (1)
1669&& !(exception is AggregateException aggregateException && aggregateException.InnerExceptions.All(innerException => innerException is InvalidProjectFileException))
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
39[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.AggregateException))]
netstandard (1)
netstandard.cs (1)
35[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.AggregateException))]
Sockets.FunctionalTests (1)
src\Servers\Kestrel\test\FunctionalTests\MaxRequestBufferSizeTests.cs (1)
294catch (AggregateException)
System.Linq.Parallel (128)
System\Linq\Parallel\QueryOperators\Inlined\InlinedAggregationOperator.cs (1)
60if (!(ex is AggregateException))
System\Linq\Parallel\Scheduling\QueryTaskGroupState.cs (2)
108catch (AggregateException ae) 110AggregateException flattenedAE = ae.Flatten();
System\Linq\ParallelEnumerable.cs (125)
489/// <exception cref="System.AggregateException"> 1605/// <exception cref="System.AggregateException"> 1653/// <exception cref="System.AggregateException"> 1693/// <exception cref="System.AggregateException"> 1749/// <exception cref="System.AggregateException"> 1802/// <exception cref="System.AggregateException"> 1840/// <exception cref="System.AggregateException"> 1882/// <exception cref="System.AggregateException"> 1911/// <exception cref="System.AggregateException"> 1949/// <exception cref="System.AggregateException"> 1978/// <exception cref="System.AggregateException"> 2001/// <exception cref="System.AggregateException"> 2024/// <exception cref="System.AggregateException"> 2047/// <exception cref="System.AggregateException"> 2070/// <exception cref="System.AggregateException"> 2091/// <exception cref="System.AggregateException"> 2112/// <exception cref="System.AggregateException"> 2133/// <exception cref="System.AggregateException"> 2154/// <exception cref="System.AggregateException"> 2177/// <exception cref="System.AggregateException"> 2202/// <exception cref="System.AggregateException"> 2226/// <exception cref="System.AggregateException"> 2250/// <exception cref="System.AggregateException"> 2274/// <exception cref="System.AggregateException"> 2298/// <exception cref="System.AggregateException"> 2320/// <exception cref="System.AggregateException"> 2342/// <exception cref="System.AggregateException"> 2364/// <exception cref="System.AggregateException"> 2386/// <exception cref="System.AggregateException"> 2410/// <exception cref="System.AggregateException"> 2448/// <exception cref="System.AggregateException"> 2469/// <exception cref="System.AggregateException"> 2493/// <exception cref="System.AggregateException"> 2514/// <exception cref="System.AggregateException"> 2538/// <exception cref="System.AggregateException"> 2559/// <exception cref="System.AggregateException"> 2583/// <exception cref="System.AggregateException"> 2604/// <exception cref="System.AggregateException"> 2628/// <exception cref="System.AggregateException"> 2649/// <exception cref="System.AggregateException"> 2674/// <exception cref="System.AggregateException"> 2701/// <exception cref="System.AggregateException"> 2723/// <exception cref="System.AggregateException"> 2748/// <exception cref="System.AggregateException"> 2770/// <exception cref="System.AggregateException"> 2795/// <exception cref="System.AggregateException"> 2817/// <exception cref="System.AggregateException"> 2842/// <exception cref="System.AggregateException"> 2864/// <exception cref="System.AggregateException"> 2889/// <exception cref="System.AggregateException"> 2911/// <exception cref="System.AggregateException"> 2937/// <exception cref="System.AggregateException"> 2963/// <exception cref="System.AggregateException"> 2984/// <exception cref="System.AggregateException"> 3008/// <exception cref="System.AggregateException"> 3029/// <exception cref="System.AggregateException"> 3053/// <exception cref="System.AggregateException"> 3074/// <exception cref="System.AggregateException"> 3098/// <exception cref="System.AggregateException"> 3119/// <exception cref="System.AggregateException"> 3143/// <exception cref="System.AggregateException"> 3164/// <exception cref="System.AggregateException"> 3188/// <exception cref="System.AggregateException"> 3215/// <exception cref="System.AggregateException"> 3237/// <exception cref="System.AggregateException"> 3262/// <exception cref="System.AggregateException"> 3284/// <exception cref="System.AggregateException"> 3309/// <exception cref="System.AggregateException"> 3331/// <exception cref="System.AggregateException"> 3356/// <exception cref="System.AggregateException"> 3378/// <exception cref="System.AggregateException"> 3403/// <exception cref="System.AggregateException"> 3425/// <exception cref="System.AggregateException"> 3451/// <exception cref="System.AggregateException"> 3477/// <exception cref="System.AggregateException"> 3500/// <exception cref="System.AggregateException"> 3526/// <exception cref="System.AggregateException"> 3549/// <exception cref="System.AggregateException"> 3575/// <exception cref="System.AggregateException"> 3596/// <exception cref="System.AggregateException"> 3620/// <exception cref="System.AggregateException"> 3641/// <exception cref="System.AggregateException"> 3665/// <exception cref="System.AggregateException"> 3686/// <exception cref="System.AggregateException"> 3713/// <exception cref="System.AggregateException"> 3737/// <exception cref="System.AggregateException"> 3764/// <exception cref="System.AggregateException"> 3788/// <exception cref="System.AggregateException"> 3815/// <exception cref="System.AggregateException"> 3837/// <exception cref="System.AggregateException"> 3862/// <exception cref="System.AggregateException"> 3884/// <exception cref="System.AggregateException"> 3909/// <exception cref="System.AggregateException"> 3931/// <exception cref="System.AggregateException"> 3958/// <exception cref="System.AggregateException"> 3981/// <exception cref="System.AggregateException"> 4010/// <exception cref="System.AggregateException"> 4041/// <exception cref="System.AggregateException"> 4066/// <exception cref="System.AggregateException"> 4315/// <exception cref="System.AggregateException"> 4365/// <exception cref="System.AggregateException"> 4810/// <exception cref="System.AggregateException"> 4842/// <exception cref="System.AggregateException"> 4919/// <exception cref="System.AggregateException"> 4948/// <exception cref="System.AggregateException"> 5010/// <exception cref="System.AggregateException"> 5045/// <exception cref="System.AggregateException"> 5106/// <exception cref="System.AggregateException"> 5131/// <exception cref="System.AggregateException"> 5185/// <exception cref="System.AggregateException"> 5217/// <exception cref="System.AggregateException"> 5389/// <exception cref="System.AggregateException"> 5432/// <exception cref="System.AggregateException"> 5471/// <exception cref="System.AggregateException"> 5517/// <exception cref="System.AggregateException"> 5565/// <exception cref="System.AggregateException"> 5608/// <exception cref="System.AggregateException"> 5649/// <exception cref="System.AggregateException"> 5691/// <exception cref="System.AggregateException"> 5739/// <exception cref="System.AggregateException"> 5768/// <exception cref="System.AggregateException"> 5795/// <exception cref="System.AggregateException"> 5825/// <exception cref="System.AggregateException"> 5900/// <exception cref="System.AggregateException"> 5940/// <exception cref="System.AggregateException">
System.Private.CoreLib (61)
src\libraries\System.Private.CoreLib\src\System\AggregateException.cs (29)
18/// <see cref="AggregateException"/> is used to consolidate multiple failures into a single, throwable 30/// Initializes a new instance of the <see cref="AggregateException"/> class. 38/// Initializes a new instance of the <see cref="AggregateException"/> class with 49/// Initializes a new instance of the <see cref="AggregateException"/> class with a specified error 65/// Initializes a new instance of the <see cref="AggregateException"/> class with 79/// Initializes a new instance of the <see cref="AggregateException"/> class with 93/// Initializes a new instance of the <see cref="AggregateException"/> class with a specified error 108/// Initializes a new instance of the <see cref="AggregateException"/> class with a specified error 139/// Initializes a new instance of the <see cref="AggregateException"/> class with 155/// Initializes a new instance of the <see cref="AggregateException"/> class with a specified error 180/// Initializes a new instance of the <see cref="AggregateException"/> class with serialized data. 219/// This will either be the root exception, or the first <see cref="AggregateException"/> 227AggregateException? backAsAggregate = this; 231backAsAggregate = back as AggregateException; 245/// cref="AggregateException"/>. 253/// unhandled, all unhandled exceptions will be put into a new <see cref="AggregateException"/> 258/// <exception cref="AggregateException">An exception contained by this <see 259/// cref="AggregateException"/> was not handled.</exception> 287/// Flattens the inner instances of <see cref="AggregateException"/> by expanding its contained <see cref="Exception"/> instances 288/// into a new <see cref="AggregateException"/> 290/// <returns>A new, flattened <see cref="AggregateException"/>.</returns> 293/// <see cref="AggregateException"/>, this method will recursively flatten all of them. The 294/// inner exceptions returned in the new <see cref="AggregateException"/> 296/// <see cref="AggregateException"/> instance. 298public AggregateException Flatten() 304var exceptionsToFlatten = new List<AggregateException> { this }; 324if (currentInnerException is AggregateException currentInnerAsAggregate) 335return new AggregateException(GetType() == typeof(AggregateException) ? base.Message : Message, flattenedExceptions.ToArray(), cloneExceptions: false); 363/// Creates and returns a string representation of the current <see cref="AggregateException"/>.
src\libraries\System.Private.CoreLib\src\System\Threading\CancellationTokenSource.cs (5)
239/// However, this overload of Cancel will aggregate any exceptions thrown into a <see cref="AggregateException"/>, 247/// <exception cref="AggregateException">An aggregate exception containing all the exceptions thrown 264/// exceptions thrown into a <see cref="AggregateException"/>, 273/// <exception cref="AggregateException">An aggregate exception containing all the exceptions thrown 296/// However, any such exceptions that are thrown will be aggregated into an <see cref="AggregateException"/>,
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ConcurrentExclusiveSchedulerPair.cs (1)
234AggregateException faultedException = faultedTask.Exception;
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (21)
1236/// Gets the <see cref="AggregateException">Exception</see> that caused the <see 1243/// <see cref="AggregateException"/> in calls to <see cref="Wait()">Wait</see> 1247public AggregateException? Exception 1251AggregateException? e = null; 1789private AggregateException? GetExceptions(bool includeTaskCanceledExceptions) 2618/// <exception cref="AggregateException"> 2644/// <exception cref="AggregateException"> 2665/// <exception cref="AggregateException"> 2698/// <exception cref="AggregateException"> 2720/// <exception cref="AggregateException"> 2742/// <exception cref="AggregateException"> 4696/// <exception cref="AggregateException"> 4725/// <exception cref="AggregateException"> 4759/// <exception cref="AggregateException"> 4807/// <exception cref="AggregateException"> 4845/// <exception cref="AggregateException"> 4890/// <exception cref="AggregateException"> 4923/// <exception cref="AggregateException"> 4924/// At least one of the <see cref="Task"/> instances was canceled. If a task was canceled, the <see cref="AggregateException"/> 4925/// contains an <see cref="OperationCanceledException"/> in its <see cref="AggregateException.InnerExceptions"/> collection. 5154AggregateException? ex = t.GetExceptions(true);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskExceptionHolder.cs (2)
64AggregateException exceptionToThrow = new AggregateException( 252internal AggregateException CreateExceptionObject(bool calledFromFinalizer, Exception? includeThisException)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskScheduler.cs (3)
616private readonly AggregateException m_exception; 624public UnobservedTaskExceptionEventArgs(AggregateException exception) { m_exception = exception; } 640public AggregateException Exception => m_exception;
System.Private.DataContractSerialization (2)
System\Runtime\Serialization\ExceptionUtility.cs (2)
30else if (exception is AggregateException) 35var innerExceptions = ((AggregateException)exception).InnerExceptions;
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
28[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.AggregateException))]
System.Runtime.Serialization.Schema (2)
System\Runtime\Serialization\Schema\DiagnosticUtility.cs (2)
32else if (exception is AggregateException) 37var innerExceptions = ((AggregateException)exception).InnerExceptions;
System.ServiceModel.Federation (1)
System\Runtime\Fx.cs (1)
28else if (exception is AggregateException aggException)
System.ServiceModel.NetFramingBase (1)
System\ServiceModel\Channels\ConnectionPool.cs (1)
342catch(AggregateException ae)
System.Threading.RateLimiting (3)
System\Threading\RateLimiting\ChainedRateLimiter.cs (3)
159AggregateException? innerEx = CommonDispose(leases, index); 174AggregateException? innerEx = CommonDispose(leases, index); 183private static AggregateException? CommonDispose(RateLimitLease[]? leases, int i)
System.Threading.Tasks (1)
System.Threading.Tasks.cs (1)
4[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.AggregateException))]
System.Threading.Tasks.Dataflow (9)
Base\DataflowBlock.cs (1)
2207private AggregateException? GetCompletionError()
Blocks\TransformBlock.cs (1)
287AggregateException aggregate = completed.Exception!;
Blocks\TransformManyBlock.cs (1)
286AggregateException aggregate = completed.Exception!;
Internal\Common.cs (5)
251var aggregate = exc as AggregateException; 322AggregateException? aggregate = exception as AggregateException; 552AggregateException? exception = sourceCompletionTask.IsFaulted ? sourceCompletionTask.Exception : null;
Internal\SourceCore.cs (1)
481internal void AddAndUnwrapAggregateException(AggregateException aggregateException)
System.Threading.Tasks.Parallel (39)
System\Threading\Tasks\Parallel.cs (38)
149/// <exception cref="System.AggregateException">The exception that is thrown when any 178/// <exception cref="System.AggregateException">The exception that is thrown when any 310if (e is AggregateException ae) 355catch (AggregateException aggExp) 380/// <exception cref="System.AggregateException">The exception that is thrown to contain an exception 406/// <exception cref="System.AggregateException">The exception that is thrown to contain an exception 438/// <exception cref="System.AggregateException">The exception that is thrown to contain an exception 475/// <exception cref="System.AggregateException">The exception that is thrown to contain an exception 505/// <exception cref="System.AggregateException">The exception that is thrown to contain an exception 554/// <exception cref="System.AggregateException">The exception that is thrown to contain an exception 588/// <exception cref="System.AggregateException">The exception that is thrown to contain an exception 627/// <exception cref="System.AggregateException">The exception that is thrown to contain an exception 669/// <exception cref="System.AggregateException">The exception that is thrown to contain an exception 722/// <exception cref="System.AggregateException">The exception that is thrown to contain an exception 782/// <exception cref="System.AggregateException">The exception that is thrown to contain an exception 847/// <exception cref="System.AggregateException">The exception that is thrown to contain an exception 1128catch (AggregateException aggExp) 1174/// <exception cref="System.AggregateException">The exception that is thrown to contain an exception 1209/// <exception cref="System.AggregateException">The exception that is thrown to contain an exception 1242/// <exception cref="System.AggregateException">The exception that is thrown to contain an exception 1279/// <exception cref="System.AggregateException">The exception that is thrown to contain an exception 1314/// <exception cref="System.AggregateException">The exception that is thrown to contain an exception 1351/// <exception cref="System.AggregateException">The exception that is thrown to contain an exception 1395/// <exception cref="System.AggregateException">The exception that is thrown to contain an exception 1455/// <exception cref="System.AggregateException">The exception that is thrown to contain an exception 1514/// <exception cref="System.AggregateException">The exception that is thrown to contain an exception 1574/// <exception cref="System.AggregateException">The exception that is thrown to contain an exception 1819/// <exception cref="System.AggregateException">The exception that is thrown to contain an exception 1870/// <exception cref="System.AggregateException">The exception that is thrown to contain an exception 1926/// <exception cref="System.AggregateException">The exception that is thrown to contain an exception 1993/// <exception cref="System.AggregateException">The exception that is thrown to contain an exception 2071/// <exception cref="System.AggregateException">The exception that is thrown to contain an exception 2149/// <exception cref="System.AggregateException">The exception that is thrown to contain an exception 2213/// <exception cref="System.AggregateException">The exception that is thrown to contain an exception 2282/// <exception cref="System.AggregateException">The exception that is thrown to contain an exception 2362/// <exception cref="System.AggregateException">The exception that is thrown to contain an exception 2453/// <exception cref="System.AggregateException">The exception that is thrown to contain an exception 2765catch (AggregateException aggExp)
System\Threading\Tasks\Parallel.ForEachAsync.cs (1)
628catch (AggregateException ae)