154 references to InnerExceptions
Aspire.Hosting.Tests (3)
DistributedApplicationRunnerTests.cs (1)
25ex.InnerExceptions,
DistributedApplicationTests.cs (2)
316Assert.IsType<DistributedApplicationException>(ex.InnerExceptions.First()); 317Assert.Equal(exceptionMessage, ex.InnerExceptions.First().Message);
ClientSample (1)
RawSample.cs (1)
62catch (AggregateException aex) when (aex.InnerExceptions.All(e => e is OperationCanceledException))
Crossgen2Tasks (2)
CommonFilePulledFromSdkRepo\TaskBase.cs (2)
64for (int i = 0; i < aggregate.InnerExceptions.Count; i++) 71ExceptionToStringWithoutMessage(aggregate.InnerExceptions[i]),
dotnet-openapi (1)
Application.cs (1)
63foreach (var innerException in ex.InnerExceptions)
dotnet-svcutil-lib (3)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\ExceptionTrace.cs (1)
136ReadOnlyCollection<Exception> innerExceptions = aggregateException.Flatten().InnerExceptions;
FrameworkFork\System.ServiceModel\Internals\System\Runtime\Fx.cs (1)
205ReadOnlyCollection<Exception> innerExceptions = ((AggregateException)exception).InnerExceptions;
Tool.cs (1)
346foreach (var ax in agex.InnerExceptions)
Microsoft.AspNetCore.Authentication.JwtBearer (1)
JwtBearerHandler.cs (1)
374exceptions = agEx.InnerExceptions;
Microsoft.AspNetCore.Components.Server (1)
Circuits\RemoteRenderer.cs (1)
119foreach (var innerException in aggregateException.Flatten().InnerExceptions)
Microsoft.AspNetCore.Components.Server.Tests (1)
Circuits\CircuitHostTest.cs (1)
285Assert.Same(ex, aex.InnerExceptions.Single());
Microsoft.AspNetCore.Components.Tests (4)
RendererTest.cs (4)
2302Assert.Contains(exception1, aex.InnerExceptions); 2303Assert.Contains(exception2, aex.InnerExceptions); 4258Assert.Contains(exception1, aex.InnerExceptions); 4259Assert.Contains(exception2, aex.InnerExceptions);
Microsoft.AspNetCore.Components.WebAssembly (1)
Rendering\WebAssemblyRenderer.cs (1)
176foreach (var innerException in aggregateException.Flatten().InnerExceptions)
Microsoft.AspNetCore.Diagnostics (1)
src\Shared\StackTrace\ExceptionDetails\ExceptionDetailsProvider.cs (1)
76foreach (var innerException in aggregateException.Flatten().InnerExceptions)
Microsoft.AspNetCore.Hosting (3)
GenericHost\GenericWebHostService.cs (1)
182foreach (var exception in Options.HostingStartupExceptions.InnerExceptions)
Internal\WebHost.cs (1)
165foreach (var exception in _hostingStartupErrors.InnerExceptions)
src\Shared\StackTrace\ExceptionDetails\ExceptionDetailsProvider.cs (1)
76foreach (var innerException in aggregateException.Flatten().InnerExceptions)
Microsoft.AspNetCore.Hosting.Tests (2)
WebHostBuilderTests.cs (2)
1359stopEx = Assert.Single(aggregateException.InnerExceptions); 1385stopEx = Assert.Single(aggregateException.InnerExceptions);
Microsoft.AspNetCore.Server.IIS (1)
src\Shared\StackTrace\ExceptionDetails\ExceptionDetailsProvider.cs (1)
76foreach (var innerException in aggregateException.Flatten().InnerExceptions)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
DiagnosticMemoryPoolTests.cs (2)
199Assert.Equal(new Exception[] { exception }, aggregateException.InnerExceptions); 225Assert.Equal(inner, exception.InnerExceptions);
Microsoft.AspNetCore.SignalR.Client.Tests (2)
HttpConnectionTests.ConnectionLifecycle.cs (2)
448Assert.Equal(3, ex.InnerExceptions.Count); 449var innerEx = ex.InnerExceptions[2];
Microsoft.Build (13)
BackEnd\BuildManager\BuildManager.cs (8)
1061if (e is AggregateException ae && ae.InnerExceptions.Count == 1) 1063ExceptionDispatchInfo.Capture(ae.InnerExceptions[0]).Throw(); 1736if (ae.InnerExceptions.Count == 1) 1738ex = ae.InnerExceptions[0]; 1743foreach (Exception innerException in ae.InnerExceptions) 2507catch (AggregateException ex) when (ex.InnerExceptions.All(inner => inner is OperationCanceledException)) 2856if (e is AggregateException ae && ae.InnerExceptions.Count == 1) 2858e = ae.InnerExceptions.First();
BackEnd\Components\RequestBuilder\RequestBuilder.cs (1)
315return e.Flatten().InnerExceptions.All(ex => ex is TaskCanceledException || ex is OperationCanceledException);
ExceptionHandling.cs (1)
128if (aggregateException.InnerExceptions.Any(innerException => IsCriticalException(innerException)))
FileMatcher.cs (2)
2584if (ex.Flatten().InnerExceptions.All(ExceptionHandling.IsIoRelatedException)) 2617return ex.Flatten().InnerExceptions.All(ExceptionHandling.IsIoRelatedException);
TaskLoggingHelper.cs (1)
936foreach (Exception innerException in aggregateException.Flatten().InnerExceptions)
Microsoft.Build.Engine.OM.UnitTests (1)
ExceptionHandling.cs (1)
128if (aggregateException.InnerExceptions.Any(innerException => IsCriticalException(innerException)))
Microsoft.Build.Engine.UnitTests (10)
BackEnd\BuildManager_Tests.cs (3)
4256aggException.InnerExceptions.Count.ShouldBe(2); 4257aggException.InnerExceptions[0].ShouldBeOfType<InvalidProjectFileException>().ProjectFile.ShouldBeOneOf(project2, project3); 4258aggException.InnerExceptions[1].ShouldBeOfType<InvalidProjectFileException>().ProjectFile.ShouldBeOneOf(project2, project3);
Graph\GraphLoadedFromSolution_tests.cs (2)
83aggException.InnerExceptions.ShouldHaveSingleItem(); 85var exception = aggException.InnerExceptions[0].ShouldBeOfType<InvalidOperationException>();
Graph\ParallelWorkSet_Tests.cs (1)
267Should.Throw<AggregateException>(() => _workSet.WaitForAllWorkAndComplete()).InnerExceptions.ShouldBeSetEquivalentTo(observedExceptions);
Graph\ProjectGraph_Tests.cs (4)
211aggException.InnerExceptions.ShouldHaveSingleItem(); 213aggException.InnerExceptions[0].ShouldBeOfType<InvalidOperationException>(); 564aggException.InnerExceptions.ShouldHaveSingleItem(); 566aggException.InnerExceptions[0].ShouldBeOfType<InvalidProjectFileException>();
Microsoft.Build.Tasks.Core (3)
ExceptionHandling.cs (1)
128if (aggregateException.InnerExceptions.Any(innerException => IsCriticalException(innerException)))
FileMatcher.cs (2)
2584if (ex.Flatten().InnerExceptions.All(ExceptionHandling.IsIoRelatedException)) 2617return ex.Flatten().InnerExceptions.All(ExceptionHandling.IsIoRelatedException);
Microsoft.Build.Utilities.Core (4)
ExceptionHandling.cs (1)
128if (aggregateException.InnerExceptions.Any(innerException => IsCriticalException(innerException)))
FileMatcher.cs (2)
2584if (ex.Flatten().InnerExceptions.All(ExceptionHandling.IsIoRelatedException)) 2617return ex.Flatten().InnerExceptions.All(ExceptionHandling.IsIoRelatedException);
TaskLoggingHelper.cs (1)
936foreach (Exception innerException in aggregateException.Flatten().InnerExceptions)
Microsoft.CodeAnalysis (5)
InternalUtilities\FailFast.cs (2)
35if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 37exception = aggregate.InnerExceptions[0];
InternalUtilities\FatalError.cs (2)
268if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
src\Compilers\Core\AnalyzerDriver\AnalyzerExceptionDescriptionBuilder.cs (1)
23return string.Join(s_separator, flattened.InnerExceptions.Select(e => GetExceptionMessage(e)));
Microsoft.CodeAnalysis.CodeStyle (7)
src\Compilers\Core\Portable\InternalUtilities\FailFast.cs (2)
35if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 37exception = aggregate.InnerExceptions[0];
src\Compilers\Core\Portable\InternalUtilities\FatalError.cs (2)
268if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (2)
582if (task.Exception.InnerExceptions.Count > 0) 583this.TrySetException(task.Exception.InnerExceptions);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (1)
524_exceptions.AddRange(ae.InnerExceptions);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Utilities\AsynchronousOperationListenerTests.cs (1)
47foreach (var inner in e.InnerExceptions)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (4)
src\Compilers\Core\Portable\InternalUtilities\FailFast.cs (2)
35if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 37exception = aggregate.InnerExceptions[0];
src\Compilers\Core\Portable\InternalUtilities\FatalError.cs (2)
268if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (4)
src\Compilers\Core\Portable\InternalUtilities\FailFast.cs (2)
35if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 37exception = aggregate.InnerExceptions[0];
src\Compilers\Core\Portable\InternalUtilities\FatalError.cs (2)
268if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
Microsoft.CodeAnalysis.Features (4)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.cs (2)
132if (ae.InnerExceptions.Any(e => e is not OperationCanceledException) || 133ae.InnerExceptions.Cast<OperationCanceledException>().Any(NotOurShutdownToken))
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingIncrementalAnalyzerProcessor.cs (1)
236if (flattened.InnerExceptions.All(e => e is OperationCanceledException))
src\Compilers\Core\AnalyzerDriver\AnalyzerExceptionDescriptionBuilder.cs (1)
23return string.Join(s_separator, flattened.InnerExceptions.Select(e => GetExceptionMessage(e)));
Microsoft.CodeAnalysis.InteractiveHost (6)
src\Compilers\Core\Portable\InternalUtilities\FailFast.cs (2)
35if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 37exception = aggregate.InnerExceptions[0];
src\Compilers\Core\Portable\InternalUtilities\FatalError.cs (2)
268if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (2)
582if (task.Exception.InnerExceptions.Count > 0) 583this.TrySetException(task.Exception.InnerExceptions);
Microsoft.CodeAnalysis.LanguageServer (1)
Logging\RoslynLogger.cs (1)
70foreach (var innerException in aggregateException.Flatten().InnerExceptions)
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
src\VisualStudio\Core\Def\Watson\FaultReporter.cs (1)
122foreach (var innerException in aggregateException.Flatten().InnerExceptions)
Microsoft.CodeAnalysis.Threading.Package (2)
src\Compilers\Core\Portable\InternalUtilities\FatalError.cs (2)
268if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
Microsoft.CodeAnalysis.Workspaces (6)
src\Compilers\Core\Portable\InternalUtilities\FailFast.cs (2)
35if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 37exception = aggregate.InnerExceptions[0];
src\Compilers\Core\Portable\InternalUtilities\FatalError.cs (2)
268if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (2)
582if (task.Exception.InnerExceptions.Count > 0) 583this.TrySetException(task.Exception.InnerExceptions);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (4)
src\Compilers\Core\Portable\InternalUtilities\FailFast.cs (2)
35if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 37exception = aggregate.InnerExceptions[0];
src\Compilers\Core\Portable\InternalUtilities\FatalError.cs (2)
268if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
UtilityTest\CancellationSeriesTests.cs (1)
128Assert.Same(exception, aggregateException.InnerExceptions.Single());
Microsoft.DotNet.NuGetRepack.Tasks (1)
src\UpdatePackageVersionTask.cs (1)
96foreach (var inner in e.InnerExceptions)
Microsoft.DotNet.NuGetRepack.Tests (3)
VersionUpdaterTests.cs (3)
147}, e2.InnerExceptions.Select(i => i.ToString())); 154}, e3.InnerExceptions.Select(i => i.ToString())); 161}, e4.InnerExceptions.Select(i => i.ToString()));
Microsoft.Extensions.AI.Evaluation.Console (1)
Utilities\ExceptionUtilities.cs (1)
34foreach (var innerException in aggregateException.InnerExceptions)
Microsoft.Extensions.AI.Tests (6)
ChatCompletion\FunctionInvokingChatClientTests.cs (6)
309Assert.Equal(2, ex.InnerExceptions.Count); 310Assert.Equal("Exception from call 11", ex.InnerExceptions[0].Message); 311Assert.Equal("Exception from call 12", ex.InnerExceptions[1].Message); 315Assert.Equal(2, ex.InnerExceptions.Count); 316Assert.Equal("Exception from call 11", ex.InnerExceptions[0].Message); 317Assert.Equal("Exception from call 12", ex.InnerExceptions[1].Message);
Microsoft.Extensions.Hosting (2)
Internal\Host.cs (2)
339exceptions.AddRange(task.Exception.InnerExceptions); // Log exception from async method. 366exceptions.AddRange(groupedTasks.Exception.InnerExceptions);
Microsoft.Extensions.Hosting.Testing.Tests (2)
FakeHostBuilderTests.cs (2)
139((AggregateException)exception).InnerExceptions, 171((AggregateException)exception).InnerExceptions,
Microsoft.Extensions.Logging.AzureAppServices (2)
BatchingLoggerProvider.cs (2)
177catch (AggregateException ex) when (ex.InnerExceptions.Count == 1 && ex.InnerExceptions[0] is TaskCanceledException)
Microsoft.Extensions.Telemetry (1)
Logging\ExtendedLogger.cs (1)
210foreach (var ex in aggregateException.InnerExceptions)
Microsoft.ML.AutoML (1)
Experiment\Experiment.cs (1)
209if (e.InnerExceptions.All(exception => exception is OperationCanceledException))
Microsoft.ML.AutoML.Tests (2)
AutoFitTests.cs (2)
564foreach (var ex in ae.Flatten().InnerExceptions) 672foreach (var ex in lastAggregateException.Flatten().InnerExceptions)
Microsoft.VisualStudio.LanguageServices (3)
ErrorReporting\VisualStudioErrorReportingService.ExceptionFormatting.cs (2)
38for (var i = 0; i < aggregate.InnerExceptions.Count; i++) 40text = $"{text}{Environment.NewLine}---> (Inner Exception #{i}) {GetFormattedExceptionStack(aggregate.InnerExceptions[i])} <--- {Environment.NewLine}";
Watson\FaultReporter.cs (1)
122foreach (var innerException in aggregateException.Flatten().InnerExceptions)
MSBuild (2)
ExceptionHandling.cs (1)
128if (aggregateException.InnerExceptions.Any(innerException => IsCriticalException(innerException)))
XMake.cs (1)
1669&& !(exception is AggregateException aggregateException && aggregateException.InnerExceptions.All(innerException => innerException is InvalidProjectFileException))
System.Linq.Parallel (3)
System\Linq\Parallel\Scheduling\QueryTaskGroupState.cs (3)
112for (int i = 0; i < flattenedAE.InnerExceptions.Count; i++) 114OperationCanceledException? oce = flattenedAE.InnerExceptions[i] as OperationCanceledException; 130if (!allOCEsOnTrackedExternalCancellationToken || flattenedAE.InnerExceptions.Count == 0)
System.Private.CoreLib (3)
src\libraries\System.Private.CoreLib\src\System\AggregateException.cs (2)
228while (backAsAggregate != null && backAsAggregate.InnerExceptions.Count == 1) 311ReadOnlyCollection<Exception> currentInnerExceptions = exceptionsToFlatten[nDequeueIndex++].InnerExceptions;
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (1)
4925/// contains an <see cref="OperationCanceledException"/> in its <see cref="AggregateException.InnerExceptions"/> collection.
System.Private.DataContractSerialization (1)
System\Runtime\Serialization\ExceptionUtility.cs (1)
35var innerExceptions = ((AggregateException)exception).InnerExceptions;
System.Runtime.Serialization.Schema (1)
System\Runtime\Serialization\Schema\DiagnosticUtility.cs (1)
37var innerExceptions = ((AggregateException)exception).InnerExceptions;
System.ServiceModel.Federation (1)
System\Runtime\Fx.cs (1)
33ReadOnlyCollection<Exception> innerExceptions = aggException.InnerExceptions;
System.ServiceModel.NetFramingBase (1)
System\ServiceModel\Channels\ConnectionPool.cs (1)
344var toe = ae.InnerExceptions.FirstOrDefault(e => e is TimeoutException);
System.ServiceModel.Primitives.Tests (1)
ServiceModel\ThrowingOnCloseBindingElement.cs (1)
166tcs.TrySetException(task.Exception.InnerExceptions);
System.Threading.RateLimiting (2)
System\Threading\RateLimiting\ChainedRateLimiter.cs (2)
163Exception[] exceptions = new Exception[innerEx.InnerExceptions.Count + 1]; 164innerEx.InnerExceptions.CopyTo(exceptions, 0);
System.Threading.Tasks.Dataflow (4)
Internal\Common.cs (2)
254foreach (Exception innerException in aggregate.InnerExceptions) 325list.AddRange(aggregate.InnerExceptions);
Internal\DataflowEtwProvider.cs (1)
143try { exceptionData = string.Join(Environment.NewLine, completionTask.Exception!.InnerExceptions.Select(static e => e.ToString())); }
Internal\SourceCore.cs (1)
483Debug.Assert(aggregateException != null && aggregateException.InnerExceptions.Count > 0, "Aggregate must be valid and contain inner exceptions to unwrap.");
System.Threading.Tasks.Parallel (5)
System\Threading\Tasks\Parallel.cs (4)
314foreach (Exception exc in ae.InnerExceptions) exceptionQ.Enqueue(exc); 358ThrowSingleCancellationExceptionOrOtherException(aggExp.InnerExceptions, parallelOptions.CancellationToken, aggExp); 1131ThrowSingleCancellationExceptionOrOtherException(aggExp.InnerExceptions, parallelOptions.CancellationToken, aggExp); 2768ThrowSingleCancellationExceptionOrOtherException(aggExp.InnerExceptions, parallelOptions.CancellationToken, aggExp);
System\Threading\Tasks\Parallel.ForEachAsync.cs (1)
633_exceptions.AddRange(ae.InnerExceptions);