236 references to Exception
Aspire.Hosting.Tests (2)
Orchestrator\ParameterProcessorTests.cs (2)
127Assert.IsType<MissingParameterValueException>(parameterWithMissingValue.WaitForValueTcs.Task.Exception?.InnerException); 160Assert.IsType<InvalidOperationException>(parameterWithError.WaitForValueTcs.Task.Exception?.InnerException);
BuildActionTelemetryTable (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
231_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!), 241_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!, cancellationToken),
CatalogDb (2)
CatalogDbInitializerHealthCheck.cs (2)
14{ IsFaulted: true } => Task.FromResult(HealthCheckResult.Unhealthy(task.Exception?.InnerException?.Message, task.Exception)),
CodeStyleConfigFileGenerator (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
231_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!), 241_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!, cancellationToken),
dotnet-svcutil-lib (10)
FrameworkFork\Microsoft.Xml\Xml\AsyncHelper.cs (1)
27return task.IsCompleted && task.Exception == null;
FrameworkFork\System.ServiceModel\Internals\System\Runtime\TaskHelpers.cs (3)
23throw Fx.Exception.AsError<TException>(task.Exception); 60if (antecedent.IsFaulted) tcsObj.TrySetException(antecedent.Exception.InnerException); 109tcsObj.TrySetException(antecedent.Exception.InnerException);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\WebSocketHelper.cs (2)
193throw FxTrace.Exception.AsError<CommunicationException>(task.Exception); 206return FxTrace.Exception.AsError<CommunicationException>(task.Exception);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\TaskMethodInvoker.cs (4)
83Fx.Assert(invokeTask.Exception != null, "Task.IsFaulted guarantees non-null exception."); 84ae = invokeTask.Exception; 94Fx.Assert(task.Exception != null, "Task.IsFaulted guarantees non-null exception."); 95ae = task.Exception;
GenerateDocumentationAndConfigFiles (7)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
231_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!), 241_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!, cancellationToken),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (4)
581RoslynDebug.AssertNotNull(task.Exception); 582if (task.Exception.InnerExceptions.Count > 0) 583this.TrySetException(task.Exception.InnerExceptions); 585this.TrySetException(task.Exception);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (1)
100static (task, channel) => ((Channel<T>)channel!).Writer.Complete(task.Exception),
Metrics (7)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
231_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!), 241_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!, cancellationToken),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (4)
581RoslynDebug.AssertNotNull(task.Exception); 582if (task.Exception.InnerExceptions.Count > 0) 583this.TrySetException(task.Exception.InnerExceptions); 585this.TrySetException(task.Exception);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (1)
100static (task, channel) => ((Channel<T>)channel!).Writer.Complete(task.Exception),
Metrics.Legacy (7)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
231_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!), 241_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!, cancellationToken),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (4)
581RoslynDebug.AssertNotNull(task.Exception); 582if (task.Exception.InnerExceptions.Count > 0) 583this.TrySetException(task.Exception.InnerExceptions); 585this.TrySetException(task.Exception);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (1)
100static (task, channel) => ((Channel<T>)channel!).Writer.Complete(task.Exception),
Microsoft.AspNetCore.Components (5)
ErrorBoundaryBase.cs (1)
98ExceptionDispatchInfo.Capture(onExceptionTask.Exception!).Throw();
RenderTree\Renderer.cs (4)
648var baseException = task.Exception.GetBaseException(); 889HandleException(updateDisplayTask.Exception); 936HandleException(updateDisplayTask.Exception); 980HandleExceptionViaErrorBoundary(task.Exception, state);
Microsoft.AspNetCore.Components.Authorization.Tests (2)
src\Components\Shared\test\AutoRenderComponent.cs (1)
33var exception = t.Exception.Flatten().InnerException;
src\Components\Shared\test\TestRenderer.cs (1)
85var exception = task.Exception.Flatten().InnerException;
Microsoft.AspNetCore.Components.Endpoints.Tests (2)
ImportMapTest.cs (1)
318var exception = task.Exception.Flatten().InnerException;
src\Components\Shared\test\AutoRenderComponent.cs (1)
33var exception = t.Exception.Flatten().InnerException;
Microsoft.AspNetCore.Components.Forms.Tests (2)
src\Components\Shared\test\AutoRenderComponent.cs (1)
33var exception = t.Exception.Flatten().InnerException;
src\Components\Shared\test\TestRenderer.cs (1)
85var exception = task.Exception.Flatten().InnerException;
Microsoft.AspNetCore.Components.Tests (3)
RendererTest.cs (1)
5211var exception = t.Exception.Flatten().InnerException;
src\Components\Shared\test\AutoRenderComponent.cs (1)
33var exception = t.Exception.Flatten().InnerException;
src\Components\Shared\test\TestRenderer.cs (1)
85var exception = task.Exception.Flatten().InnerException;
Microsoft.AspNetCore.Components.Web (2)
HtmlRendering\StaticHtmlRenderer.cs (2)
74ExceptionDispatchInfo.Capture(quiescenceTask.Exception.InnerException ?? quiescenceTask.Exception).Throw();
Microsoft.AspNetCore.Components.Web.Tests (2)
src\Components\Shared\test\AutoRenderComponent.cs (1)
33var exception = t.Exception.Flatten().InnerException;
src\Components\Shared\test\TestRenderer.cs (1)
85var exception = task.Exception.Flatten().InnerException;
Microsoft.AspNetCore.Components.WebAssembly (2)
Rendering\WebAssemblyDispatcher.cs (2)
102state.tcs.SetException(t.Exception); 146state.tcs.SetException(t.Exception);
Microsoft.AspNetCore.DataProtection (2)
KeyManagement\KeyRingProvider.cs (2)
410static t => _ = t.Exception, // Still observe the exception - just don't throw it 426throw Error.KeyRingProvider_RefreshFailedOnOtherThread(existingTask.Exception);
Microsoft.AspNetCore.Http.Connections (3)
Internal\HttpConnectionContext.cs (2)
341Transport?.Output.Complete(applicationTask.Exception?.InnerException); 366Application?.Output.Complete(transportTask.Exception?.InnerException);
Internal\HttpConnectionDispatcher.cs (1)
264connection.Transport.Output.Complete(connection.ApplicationTask.Exception);
Microsoft.AspNetCore.Http.Connections.Client (2)
Internal\LongPollingTransport.cs (1)
98_error = sending.IsFaulted ? sending.Exception!.InnerException : null;
Internal\ServerSentEventsTransport.cs (1)
115_error = sending.IsFaulted ? sending.Exception!.InnerException : null;
Microsoft.AspNetCore.OutputCaching.Tests (1)
CachedResponseBodyTests.cs (1)
36var copyTask = RecyclableReadOnlySequenceSegment.CopyToAsync(body, pipe.Writer, cts.Token).AsTask().ContinueWith(t => pipe.Writer.CompleteAsync(t.Exception));
Microsoft.AspNetCore.Owin (1)
WebSockets\OwinWebSocketAcceptAdapter.cs (1)
90_requestTcs.TrySetException(task.Exception);
Microsoft.AspNetCore.SignalR.Client.Core (4)
HubConnection.cs (2)
614static t => _ = t.Exception, 697_ = reader.Completion.Exception;
HubConnectionExtensions.StreamAsChannelAsync.cs (1)
316_ = inputChannel.Completion.Exception;
src\SignalR\common\Shared\MessageBuffer.cs (1)
295_ = tcs.Task.Exception;
Microsoft.AspNetCore.SignalR.Core (1)
src\SignalR\common\Shared\MessageBuffer.cs (1)
295_ = tcs.Task.Exception;
Microsoft.Build.Framework (2)
FatalError.cs (2)
231_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!), 241_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!, cancellationToken),
Microsoft.Build.Tasks.CodeAnalysis (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
231_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!), 241_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!, cancellationToken),
Microsoft.Build.Tasks.CodeAnalysis.Sdk (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
231_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!), 241_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!, cancellationToken),
Microsoft.CodeAnalysis (1)
DiagnosticAnalyzer\AnalyzerDriver.cs (1)
718var innerException = faultedTask.Exception?.InnerException;
Microsoft.CodeAnalysis.Analyzers (7)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
231_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!), 241_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!, cancellationToken),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (4)
581RoslynDebug.AssertNotNull(task.Exception); 582if (task.Exception.InnerExceptions.Count > 0) 583this.TrySetException(task.Exception.InnerExceptions); 585this.TrySetException(task.Exception);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (1)
100static (task, channel) => ((Channel<T>)channel!).Writer.Complete(task.Exception),
Microsoft.CodeAnalysis.AnalyzerUtilities (7)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
231_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!), 241_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!, cancellationToken),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (4)
581RoslynDebug.AssertNotNull(task.Exception); 582if (task.Exception.InnerExceptions.Count > 0) 583this.TrySetException(task.Exception.InnerExceptions); 585this.TrySetException(task.Exception);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (1)
100static (task, channel) => ((Channel<T>)channel!).Writer.Complete(task.Exception),
Microsoft.CodeAnalysis.BannedApiAnalyzers (7)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
231_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!), 241_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!, cancellationToken),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (4)
581RoslynDebug.AssertNotNull(task.Exception); 582if (task.Exception.InnerExceptions.Count > 0) 583this.TrySetException(task.Exception.InnerExceptions); 585this.TrySetException(task.Exception);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (1)
100static (task, channel) => ((Channel<T>)channel!).Writer.Complete(task.Exception),
Microsoft.CodeAnalysis.CodeStyle (7)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
231_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!), 241_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!, cancellationToken),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (4)
581RoslynDebug.AssertNotNull(task.Exception); 582if (task.Exception.InnerExceptions.Count > 0) 583this.TrySetException(task.Exception.InnerExceptions); 585this.TrySetException(task.Exception);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (1)
100static (task, channel) => ((Channel<T>)channel!).Writer.Complete(task.Exception),
Microsoft.CodeAnalysis.Collections.Package (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
231_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!), 241_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!, cancellationToken),
Microsoft.CodeAnalysis.Contracts.Package (2)
ErrorReporting\FatalError.cs (2)
231_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!), 241_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!, cancellationToken),
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (3)
ScriptTests.cs (3)
239Assert.Null(state.Exception); 246Assert.Null(state.Exception); 256Assert.Null(state.Exception);
Microsoft.CodeAnalysis.Debugging.Package (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
231_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!), 241_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!, cancellationToken),
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
231_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!), 241_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!, cancellationToken),
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
231_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!), 241_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!, cancellationToken),
Microsoft.CodeAnalysis.Extensions.Package (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
231_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!), 241_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!, cancellationToken),
Microsoft.CodeAnalysis.InteractiveHost (6)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
231_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!), 241_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!, cancellationToken),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (4)
581RoslynDebug.AssertNotNull(task.Exception); 582if (task.Exception.InnerExceptions.Count > 0) 583this.TrySetException(task.Exception.InnerExceptions); 585this.TrySetException(task.Exception);
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (7)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
231_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!), 241_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!, cancellationToken),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (4)
581RoslynDebug.AssertNotNull(task.Exception); 582if (task.Exception.InnerExceptions.Count > 0) 583this.TrySetException(task.Exception.InnerExceptions); 585this.TrySetException(task.Exception);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (1)
100static (task, channel) => ((Channel<T>)channel!).Writer.Complete(task.Exception),
Microsoft.CodeAnalysis.PooledObjects.Package (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
231_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!), 241_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!, cancellationToken),
Microsoft.CodeAnalysis.PublicApiAnalyzers (7)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
231_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!), 241_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!, cancellationToken),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (4)
581RoslynDebug.AssertNotNull(task.Exception); 582if (task.Exception.InnerExceptions.Count > 0) 583this.TrySetException(task.Exception.InnerExceptions); 585this.TrySetException(task.Exception);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (1)
100static (task, channel) => ((Channel<T>)channel!).Writer.Complete(task.Exception),
Microsoft.CodeAnalysis.ResxSourceGenerator (7)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
231_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!), 241_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!, cancellationToken),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (4)
581RoslynDebug.AssertNotNull(task.Exception); 582if (task.Exception.InnerExceptions.Count > 0) 583this.TrySetException(task.Exception.InnerExceptions); 585this.TrySetException(task.Exception);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (1)
100static (task, channel) => ((Channel<T>)channel!).Writer.Complete(task.Exception),
Microsoft.CodeAnalysis.Threading.Package (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
231_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!), 241_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!, cancellationToken),
Microsoft.CodeAnalysis.Workspaces (9)
Shared\TestHooks\AsynchronousOperationListenerProvider.cs (2)
181if (task.Exception != null) 183throw task.Exception;
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
231_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!), 241_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!, cancellationToken),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (4)
581RoslynDebug.AssertNotNull(task.Exception); 582if (task.Exception.InnerExceptions.Count > 0) 583this.TrySetException(task.Exception.InnerExceptions); 585this.TrySetException(task.Exception);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (1)
100static (task, channel) => ((Channel<T>)channel!).Writer.Complete(task.Exception),
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
231_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!), 241_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!, cancellationToken),
Microsoft.CommonLanguageServerProtocol.Framework.Package (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
231_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!), 241_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!, cancellationToken),
Microsoft.Extensions.Hosting (3)
Internal\Host.cs (3)
337if (task.Exception is not null) 339exceptions.AddRange(task.Exception.InnerExceptions); // Log exception from async method. 366exceptions.AddRange(groupedTasks.Exception.InnerExceptions);
Microsoft.JSInterop (2)
Infrastructure\DotNetDispatcher.cs (2)
144if (task.Exception != null) 146var exceptionDispatchInfo = ExceptionDispatchInfo.Capture(task.Exception.GetBaseException());
Microsoft.JSInterop.Tests (1)
JSRuntimeTest.cs (1)
201var exception = Assert.IsType<AggregateException>(task.AsTask().Exception);
Microsoft.Maui.Controls (1)
NavigationPage\NavigationPage.cs (1)
412 throw t.Exception;
Microsoft.Maui.Resizetizer (2)
AsyncTask.cs (2)
66 if (task.Exception != null) 68 var ex = task.Exception.GetBaseException();
Replay (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
231_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!), 241_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!, cancellationToken),
Roslyn.Diagnostics.Analyzers (7)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
231_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!), 241_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!, cancellationToken),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (4)
581RoslynDebug.AssertNotNull(task.Exception); 582if (task.Exception.InnerExceptions.Count > 0) 583this.TrySetException(task.Exception.InnerExceptions); 585this.TrySetException(task.Exception);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (1)
100static (task, channel) => ((Channel<T>)channel!).Writer.Complete(task.Exception),
SemanticSearch.BuildTask (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
231_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!), 241_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!, cancellationToken),
System.Data.Odbc (1)
Common\System\Data\ProviderBase\DbConnectionFactory.cs (1)
112retry.TrySetException(task.Exception!.InnerException!);
System.Net.Ping (1)
System\Net\NetworkInformation\Ping.cs (1)
527var e = new PingCompletedEventArgs(t.IsCompletedSuccessfully ? t.Result : null, t.Exception, t.IsCanceled, asyncOp.UserSuppliedState);
System.Private.CoreLib (9)
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\TaskAwaiter.cs (1)
161throw task.Exception!;
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ConcurrentExclusiveSchedulerPair.cs (3)
230Debug.Assert(faultedTask != null && faultedTask.IsFaulted && faultedTask.Exception!.InnerExceptionCount > 0, 234AggregateException faultedException = faultedTask.Exception; 648_ = t.Exception;
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Future.cs (1)
1431public Exception? Exception => m_task.Exception;
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (4)
1245/// or in accesses to the <see cref="Exception"/> property. Any exceptions not observed by the time 1520/// <see cref="Exception"/> property will be non-null. 1522[MemberNotNullWhen(true, nameof(Exception))] 7150public Exception? Exception => m_task.Exception;
System.ServiceModel.Federation (2)
System\Runtime\TaskHelpers.cs (2)
48tcsObj.TrySetException(antecedent.Exception.InnerException); 104tcsObj.TrySetException(antecedent.Exception.InnerException);
System.ServiceModel.Primitives.Tests (1)
ServiceModel\ThrowingOnCloseBindingElement.cs (1)
166tcs.TrySetException(task.Exception.InnerExceptions);
System.Threading.Channels (1)
System\Threading\Channels\ChannelUtilities.cs (1)
44_ = tcs.Task.Exception;
System.Threading.Tasks.Dataflow (20)
Base\DataflowBlock.cs (3)
1955Common.AddException(ref exceptions, task.Exception!, unwrapInnerExceptions: true); 2213sourceCompletionTask.Exception : null; 2385static (t, state) => ((ObserversState)state!).NotifyObserversOfCompletion(t.Exception!), this,
Blocks\ActionBlock.cs (1)
207_defaultTarget.Complete(completed.Exception, dropPendingMessages: true, storeExceptionEvenIfAlreadyCompleting: true, unwrapInnerExceptions: true);
Blocks\BatchBlock.cs (1)
85thisBlock.Fault(completed.Exception!);
Blocks\BatchedJoinBlock.cs (2)
103thisBlock.Fault(completed.Exception!); 352thisBlock.Fault(completed.Exception!);
Blocks\BroadcastBlock.cs (1)
92thisBlock.Fault(completed.Exception!);
Blocks\BufferBlock.cs (1)
74thisBlock.Fault(completed.Exception!);
Blocks\JoinBlock.cs (2)
96thisBlock.Fault(completed.Exception!); 315thisBlock.Fault(completed.Exception!);
Blocks\TransformBlock.cs (3)
143if (completed.IsFaulted) sourceCore.AddAndUnwrapAggregateException(completed.Exception!); 155thisBlock.Fault(completed.Exception!); 287AggregateException aggregate = completed.Exception!;
Blocks\TransformManyBlock.cs (3)
142if (completed.IsFaulted) sourceCore.AddAndUnwrapAggregateException(completed.Exception!); 154thisBlock.Fault(completed.Exception!); 286AggregateException aggregate = completed.Exception!;
Internal\Common.cs (2)
487_ = task.Exception; 552AggregateException? exception = sourceCompletionTask.IsFaulted ? sourceCompletionTask.Exception : null;
Internal\DataflowEtwProvider.cs (1)
143try { exceptionData = string.Join(Environment.NewLine, completionTask.Exception!.InnerExceptions.Select(static e => e.ToString())); }
Test.Utilities (7)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
231_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!), 241_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!, cancellationToken),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (4)
581RoslynDebug.AssertNotNull(task.Exception); 582if (task.Exception.InnerExceptions.Count > 0) 583this.TrySetException(task.Exception.InnerExceptions); 585this.TrySetException(task.Exception);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (1)
100static (task, channel) => ((Channel<T>)channel!).Writer.Complete(task.Exception),
Text.Analyzers (7)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
231_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!), 241_ = task.ContinueWith(p => ReportAndCatchUnlessCanceled(p.Exception!, cancellationToken),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (4)
581RoslynDebug.AssertNotNull(task.Exception); 582if (task.Exception.InnerExceptions.Count > 0) 583this.TrySetException(task.Exception.InnerExceptions); 585this.TrySetException(task.Exception);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (1)
100static (task, channel) => ((Channel<T>)channel!).Writer.Complete(task.Exception),