764 references to InnerException
aspire (5)
Backchannel\AppHostCliBackchannel.cs (1)
250|| (ex is OperationCanceledException && ex.InnerException is ConnectionLostException);
Commands\AgentInitCommand.cs (1)
452if (ex.InnerException is JsonException)
Commands\AppHostFollowDisconnectHelpers.cs (1)
24|| ex is OperationCanceledException { InnerException: ConnectionLostException };
Commands\PipelineCommandBase.cs (1)
304if (completedTask.IsFaulted && completedTask.Exception?.InnerException is DotNetSdkNotInstalledException sdkException)
Commands\TerminalAttachCommand.cs (1)
199catch (IOException ex) when (ex.InnerException is SocketException)
Aspire.Cli.Tests (2)
Agents\AspireSkillsBundleTests.cs (1)
238Assert.IsType<JsonException>(exception.InnerException);
ProfileCaptureServiceTests.cs (1)
151Assert.IsType<InvalidOperationException>(exception.InnerException);
Aspire.Dashboard (3)
DashboardWebApplication.cs (2)
1065for (var current = ex.InnerException; current is not null; current = current.InnerException)
Model\GenAI\GenAIVisualizerDialogViewModel.cs (1)
148current = current.InnerException;
Aspire.Dashboard.Tests (1)
Model\ResourceViewModelTests.cs (1)
107Assert.NotNull(ex.InnerException);
Aspire.Hosting (2)
Backchannel\AuxiliaryBackchannelService.cs (1)
192catch (IOException ex) when (ex.InnerException is SocketException { SocketErrorCode: SocketError.ConnectionReset })
src\Shared\LaunchProfiles\LaunchSettingsReader.cs (1)
53throw new DistributedApplicationException(ex.Message, ex.InnerException ?? ex);
Aspire.Hosting.Azure (1)
src\Shared\ExceptionUtils.cs (1)
25if (exception.InnerException is { } inner)
Aspire.Hosting.Azure.Functions (1)
src\Shared\LaunchProfiles\LaunchSettingsReader.cs (1)
53throw new DistributedApplicationException(ex.Message, ex.InnerException ?? ex);
Aspire.Hosting.Azure.Tests (6)
AzureAppServiceTests.cs (2)
1019var ex = Assert.IsType<NotSupportedException>(outer.InnerException); 1040var ex = Assert.IsType<NotSupportedException>(outer.InnerException);
AzureContainerAppsTests.cs (4)
1196var ex = Assert.IsType<NotSupportedException>(outer.InnerException); 1218var ex = Assert.IsType<NotSupportedException>(outer.InnerException); 1238var ex = Assert.IsType<NotSupportedException>(outer.InnerException); 1259var ex = Assert.IsType<NotSupportedException>(outer.InnerException);
Aspire.Hosting.Browsers (1)
BrowserConnectionDiagnosticsLogger.cs (1)
43for (var current = exception; current is not null; current = current.InnerException)
Aspire.Hosting.Browsers.Tests (1)
src\Aspire.Hosting.Browsers\BrowserConnectionDiagnosticsLogger.cs (1)
43for (var current = exception; current is not null; current = current.InnerException)
Aspire.Hosting.Dotnet (1)
src\Shared\LaunchProfiles\LaunchSettingsReader.cs (1)
53throw new DistributedApplicationException(ex.Message, ex.InnerException ?? ex);
Aspire.Hosting.Kubernetes.Tests (2)
KubernetesDeployTests.cs (1)
843Assert.IsType<ArgumentException>(ex.InnerException);
KubernetesGatewayTests.cs (1)
194.Select(e => e.InnerException)
Aspire.Hosting.Nats.Tests (1)
NatsFunctionalTests.cs (1)
151Assert.IsType<NatsServerException>(exception.InnerException);
Aspire.Hosting.RemoteHost (8)
Ats\CapabilityDispatcher.cs (4)
382catch (TargetInvocationException tie) when (tie.InnerException is not null) 384throw tie.InnerException; 468catch (TargetInvocationException tie) when (tie.InnerException is not null) 471throw tie.InnerException;
Ats\PolyglotCapabilityInvocationException.cs (2)
115return InnerException is not null 116? new CapabilityException(error, InnerException)
CodeGeneration\CodeGenerationDiagnostic.cs (2)
205/// <see cref="Exception.InnerException"/> is only the first of its children, so a load failure 210for (var current = exception; current is not null; current = current.InnerException)
Aspire.Hosting.RemoteHost.Tests (2)
IntegrationPackageProbeManifestTests.cs (2)
17Assert.IsType<ArgumentException>(exception.InnerException); 45Assert.IsType<ArgumentException>(exception.InnerException);
Aspire.Hosting.Testing (2)
DistributedApplicationEntryPointInvoker.cs (1)
105exception = tie.InnerException ?? tie;
src\Shared\LaunchProfiles\LaunchSettingsReader.cs (1)
53throw new DistributedApplicationException(ex.Message, ex.InnerException ?? ex);
Aspire.Hosting.Tests (12)
Dcp\DcpExecutorTests.cs (1)
5562var innerException = Assert.IsType<InvalidOperationException>(exception.InnerException);
ExecutionConfigurationGathererTests.cs (2)
229var inner = Assert.IsType<InvalidOperationException>(aggregate.InnerException); 264var inner = Assert.IsType<InvalidOperationException>(aggregate.InnerException);
Orchestrator\ParameterProcessorTests.cs (2)
139Assert.IsType<MissingParameterValueException>(parameterWithMissingValue.WaitForValueTcs.Task.Exception?.InnerException); 172Assert.IsType<InvalidOperationException>(parameterWithError.WaitForValueTcs.Task.Exception?.InnerException);
Pipelines\DistributedApplicationPipelineTests.cs (4)
410Assert.NotNull(ex.InnerException); 411Assert.Equal(exceptionMessage, ex.InnerException.Message); 660Assert.NotNull(exception.InnerException); 661Assert.Contains("ThrowHelperMethod", exception.InnerException.StackTrace);
WithEnvironmentTests.cs (1)
170var innerException = Assert.IsType<MissingParameterValueException>(exception.InnerException);
WithReferenceTests.cs (2)
308var inner = Assert.IsType<DistributedApplicationException>(aggregate.InnerException); 344var inner = Assert.IsType<MissingParameterValueException>(aggregate.InnerException);
CatalogDb (1)
CatalogDbInitializerHealthCheck.cs (1)
14{ IsFaulted: true } => Task.FromResult(HealthCheckResult.Unhealthy(task.Exception?.InnerException?.Message, task.Exception)),
Client.ExpectedExceptions.IntegrationTests (1)
ExpectedExceptionTests.4.1.0.cs (1)
115string innerExceptionMessage = ex.InnerException?.Message;
CodeStyleConfigFileGenerator (1)
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FailFast.cs (1)
74for (Exception? current = exception; current is object; current = current.InnerException)
Crossgen2Tasks (2)
CommonFilePulledFromSdkRepo\TaskBase.cs (2)
93if (e.InnerException != null) 95s = s + " ---> " + ExceptionToStringWithoutMessage(e.InnerException) + Environment.NewLine +
csc (2)
src\roslyn\src\Compilers\Shared\CompilerServerLogger.cs (2)
70Exception? e = exception.InnerException; 75e = e.InnerException;
dotnet (13)
Commands\BuildServer\Shutdown\BuildServerShutdownCommand.cs (2)
132exception.InnerException?.Message).Red()); 140exception.InnerException?.Message).Red());
Commands\Sdk\Check\ProductCollectionProvider.cs (2)
36(aggregateEx.InnerException is HttpRequestException || 37aggregateEx.InnerException is FileNotFoundException))
Commands\Solution\Remove\SolutionRemoveCommand.cs (1)
59if (ex is SolutionException || ex.InnerException is SolutionException)
Parser.cs (1)
367exception = exception.InnerException;
src\sdk\artifacts\.packages\microsoft.codeanalysis.buildclient\5.11.0-1.26425.101\contentFiles\cs\net11.0\CompilerServerLogger.cs (2)
70Exception? e = exception.InnerException; 75e = e.InnerException;
Telemetry\DockerContainerDetectorForTelemetry.cs (1)
44catch (Exception ex) when (ex is IOException || ex.InnerException is IOException)
Telemetry\TelemetryFilter.cs (2)
177if (e.InnerException != null) 179s = s + " ---> " + ExceptionToStringWithoutMessage(e.InnerException) + Environment.NewLine +
TransactionalAction.cs (2)
90$"Inner Exception Message: {ex?.InnerException?.Message + "---" + ex?.InnerException}");
dotnet-aot (7)
src\sdk\src\Cli\dotnet\Commands\Sdk\Check\ProductCollectionProvider.cs (2)
36(aggregateEx.InnerException is HttpRequestException || 37aggregateEx.InnerException is FileNotFoundException))
src\sdk\src\Cli\dotnet\Commands\Solution\Remove\SolutionRemoveCommand.cs (1)
59if (ex is SolutionException || ex.InnerException is SolutionException)
src\sdk\src\Cli\dotnet\Parser.cs (1)
367exception = exception.InnerException;
src\sdk\src\Cli\dotnet\Telemetry\DockerContainerDetectorForTelemetry.cs (1)
44catch (Exception ex) when (ex is IOException || ex.InnerException is IOException)
src\sdk\src\Cli\dotnet\Telemetry\TelemetryFilter.cs (2)
177if (e.InnerException != null) 179s = s + " ---> " + ExceptionToStringWithoutMessage(e.InnerException) + Environment.NewLine +
dotnet-Microsoft.XmlSerializer.Generator (4)
Sgen.cs (4)
528if (e.InnerException != null) 530WriteError(e.InnerException, parsableerrors); 537if (e.InnerException != null) 539WriteWarning(e.InnerException, parsableerrors);
dotnet-openapi (2)
Application.cs (2)
61catch (AggregateException ex) when (ex.InnerException != null) 65Error.WriteLine(ex.InnerException.Message);
dotnet-svcutil-lib (44)
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializer.cs (2)
397e = e.InnerException; 489e = e.InnerException;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DiagnosticUtility.cs (1)
33exception = exception.InnerException;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ExceptionDataContract.cs (1)
492fieldToValueDictionary.Add("_innerException", value.InnerException);
FrameworkFork\System.Runtime.Serialization\System\Xml\ValueHandle.cs (1)
474throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(exception.Message, exception.InnerException));
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBaseReader.cs (1)
1469throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(exception.Message, exception.InnerException));
FrameworkFork\System.ServiceModel\Internals\System\Runtime\Diagnostics\DiagnosticTraceBase.cs (2)
183if (exception.InnerException != null) 186AddExceptionToTraceString(xml, exception.InnerException);
FrameworkFork\System.ServiceModel\Internals\System\Runtime\Diagnostics\EtwDiagnosticTrace.cs (2)
305if (exception.InnerException != null) 339WriteExceptionToTraceString(xml, exception.InnerException, remainingLength, remainingAllowedRecursionDepth);
FrameworkFork\System.ServiceModel\Internals\System\Runtime\ExceptionTrace.cs (7)
52if (targetInvocationException != null && targetInvocationException.InnerException != null) 54return AsError(targetInvocationException.InnerException); 71if (targetInvocationException != null && targetInvocationException.InnerException != null) 73return AsError(targetInvocationException.InnerException, eventSource); 91Exception innerException = targetInvocationException.InnerException; 149Exception innerException = (targetInvocationException != null && targetInvocationException.InnerException != null) 150? targetInvocationException.InnerException
FrameworkFork\System.ServiceModel\Internals\System\Runtime\Fx.cs (1)
198exception = exception.InnerException;
FrameworkFork\System.ServiceModel\Internals\System\Runtime\TaskHelpers.cs (2)
60if (antecedent.IsFaulted) tcsObj.TrySetException(antecedent.Exception.InnerException); 109tcsObj.TrySetException(antecedent.Exception.InnerException);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\Connection.cs (6)
518if (ioException.InnerException is TimeoutException) 520return new TimeoutException(ioException.InnerException.Message, ioException); 522else if (ioException.InnerException is CommunicationObjectAbortedException) 524return new CommunicationObjectAbortedException(ioException.InnerException.Message, ioException); 526else if (ioException.InnerException is CommunicationException) 528return new CommunicationException(ioException.InnerException.Message, ioException);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelHelpers.cs (3)
114var inner = requestException.InnerException; 128Contract.Assert(exception.InnerException != null, "InnerException must be set to be able to convert"); 130uint hresult = (uint)exception.InnerException.HResult;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannelProxy.cs (1)
389throw e.InnerException;
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\WsdlImporter.cs (6)
1879if (wie.InnerException != null && (wie.InnerException is WsdlImportException)) 1881WsdlImportException wieInner = wie.InnerException as WsdlImportException; 1945return new WsdlImportException(item, afe.InnerException); 1964Exception messageException = this.InnerException; 1967messageException = messageException.InnerException;
FrameworkFork\System.ServiceModel\System\ServiceModel\ExceptionDetail.cs (2)
32if (exception.InnerException != null) 34_innerException = new ExceptionDetail(exception.InnerException);
FrameworkFork\System.Web.Services\Services\Description\ServiceDescription.cs (1)
3193throw new ArgumentException(GetDuplicateMessage(value.GetType(), key), e.InnerException);
Metadata\HttpAuthenticationHelper.cs (3)
25exception = exception.InnerException; 42webException = GetException<WebException>(webException.InnerException); 60webException = GetException<WebException>(webException.InnerException);
Shared\Utilities\Utilities.cs (1)
45e = e.InnerException;
Tool.cs (1)
324var ex = new AggregateException(options.Errors.Select(e => e as ToolArgumentException ?? new ToolArgumentException(e.Message, e.InnerException)));
dotnet-svcutil.xmlserializer (5)
Microsoft\Tools\ServiceModel\SvcUtil\InputModule.cs (1)
140Exception ie = tie.InnerException;
Microsoft\Tools\ServiceModel\SvcUtil\ToolConsole.cs (4)
108while (e.InnerException != null) 110if (e.Message != e.InnerException.Message) 112WriteError(e.InnerException.Message, " "); 114e = e.InnerException;
GenerateDocumentationAndConfigFiles (6)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ReflectionUtilities.cs (2)
151Debug.Assert(e.InnerException is object); 152ExceptionDispatchInfo.Capture(e.InnerException).Throw();
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FailFast.cs (1)
74for (Exception? current = exception; current is object; current = current.InnerException)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectReader.cs (2)
71catch (AggregateException ex) when (ex.InnerException is not null) 77ExceptionDispatchInfo.Throw(ex.InnerException);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
53ExceptionDispatchInfo.Capture(ex.InnerException ?? ex).Throw();
GetDocument.Insider (2)
src\ab038811704af8d7\HostFactoryResolver.cs (2)
259catch (TargetInvocationException tie) when (tie.InnerException?.GetType().Name == "HostAbortedException") 265exception = tie.InnerException ?? tie;
Infrastructure.Tests (1)
TestTriggerMap\SelectTestsCliTests.cs (1)
438Assert.NotNull(ex.InnerException);
Microsoft.AspNetCore.Components (1)
EventCallbackWorkItem.cs (1)
71return Task.FromException(e.InnerException!);
Microsoft.AspNetCore.Components.Web (1)
HtmlRendering\StaticHtmlRenderer.cs (1)
74ExceptionDispatchInfo.Capture(quiescenceTask.Exception.InnerException ?? quiescenceTask.Exception).Throw();
Microsoft.AspNetCore.Diagnostics (1)
src\aspnetcore\src\Shared\StackTrace\ExceptionDetails\ExceptionDetailsProvider.cs (1)
86ex = ex.InnerException;
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (3)
DatabaseDeveloperPageExceptionFilter.cs (1)
48?? errorContext.Exception?.InnerException as DbException;
DatabaseErrorPageMiddleware.cs (1)
137for (var e = exception; e != null && !match; e = e.InnerException)
Views\DatabaseErrorPage.Designer.cs (1)
151for (Exception? ex = Model.Exception; ex != null; ex = ex.InnerException)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (4)
Logging\AcceptanceTests.cs (4)
695var originalException = ex.InnerException?.InnerException; 729var originalException = ex.InnerException?.InnerException;
Microsoft.AspNetCore.Grpc.JsonTranscoding (2)
Internal\CommonGrpcProtocolHelpers.cs (2)
14return ex.InnerException == null ? $"{ex.GetType().Name}: {ex.Message}" : BuildErrorMessage(ex); 37while ((current = current.InnerException) != null);
Microsoft.AspNetCore.Hosting (4)
Internal\ErrorPageBuilder.cs (1)
22exception = tae.InnerException!;
src\aspnetcore\src\Shared\StackTrace\ExceptionDetails\ExceptionDetailsProvider.cs (1)
86ex = ex.InnerException;
Startup\ConventionBasedStartup.cs (2)
28ExceptionDispatchInfo.Capture(ex.InnerException!).Throw(); 41ExceptionDispatchInfo.Capture(ex.InnerException!).Throw();
Microsoft.AspNetCore.Http.Connections (3)
Internal\HttpConnectionContext.cs (2)
711Transport?.Output.Complete(applicationTask.Exception?.InnerException); 736Application?.Output.Complete(transportTask.Exception?.InnerException);
Internal\HttpConnectionManager.cs (1)
213catch (WebSocketException ex) when (ex.InnerException is IOException)
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.InternalTesting (1)
ExceptionAssertions.cs (1)
248exception = tie.InnerException;
Microsoft.AspNetCore.Mvc.Core (14)
ModelBinding\Binders\ComplexObjectModelBinder.cs (2)
720if (targetInvocationException?.InnerException != null) 722exception = targetInvocationException.InnerException;
ModelBinding\Binders\ComplexTypeModelBinder.cs (2)
558if (targetInvocationException?.InnerException != null) 560exception = targetInvocationException.InnerException;
ModelBinding\Binders\DecimalModelBinder.cs (2)
95if (!isFormatException && exception.InnerException != null) 99exception = ExceptionDispatchInfo.Capture(exception.InnerException).SourceException;
ModelBinding\Binders\DoubleModelBinder.cs (2)
95if (!isFormatException && exception.InnerException != null) 99exception = ExceptionDispatchInfo.Capture(exception.InnerException).SourceException;
ModelBinding\Binders\FloatModelBinder.cs (2)
95if (!isFormatException && exception.InnerException != null) 99exception = ExceptionDispatchInfo.Capture(exception.InnerException).SourceException;
ModelBinding\Binders\SimpleTypeModelBinder.cs (2)
90if (!isFormatException && exception.InnerException != null) 94exception = ExceptionDispatchInfo.Capture(exception.InnerException).SourceException;
ModelBinding\ModelBindingHelper.cs (2)
730if (ex.InnerException == null) 738ExceptionDispatchInfo.Capture(ex.InnerException).Throw();
Microsoft.AspNetCore.Mvc.Formatters.Xml (8)
XmlSerializerInputFormatter.cs (8)
145catch (InvalidOperationException exception) when (exception.InnerException != null && 146exception.InnerException.InnerException == null && 147string.Equals("Microsoft.GeneratedCode", exception.InnerException.Source, StringComparison.InvariantCulture)) 152throw new InputFormatterException(Resources.ErrorDeserializingInputData, exception.InnerException); 154catch (InvalidOperationException exception) when (exception.InnerException is FormatException || 155exception.InnerException is XmlException) 157throw new InputFormatterException(Resources.ErrorDeserializingInputData, exception.InnerException);
Microsoft.AspNetCore.Mvc.Testing (2)
src\ab038811704af8d7\HostFactoryResolver.cs (2)
259catch (TargetInvocationException tie) when (tie.InnerException?.GetType().Name == "HostAbortedException") 265exception = tie.InnerException ?? tie;
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
DefaultHtmlGenerator.cs (1)
1390when (exception is FormatException || exception.InnerException is FormatException)
Microsoft.AspNetCore.Server.HttpSys (2)
ValidationHelper.cs (2)
16if (exception.InnerException == null) 20return exception.Message + " (" + ExceptionMessage(exception.InnerException) + ")";
Microsoft.AspNetCore.Server.IIS (1)
src\aspnetcore\src\Shared\StackTrace\ExceptionDetails\ExceptionDetailsProvider.cs (1)
86ex = ex.InnerException;
Microsoft.AspNetCore.Server.Kestrel.Core (4)
Internal\Http3\Http3Connection.cs (2)
176if (ex.InnerException is not null) 178session.Value.Abort(new ConnectionAbortedException(ex.Message, ex.InnerException), errorCode);
Internal\WebTransport\WebTransportSession.cs (2)
107if (exception.InnerException is not null) 109stream.Value.Abort(new ConnectionAbortedException(exception.Message, exception.InnerException));
Microsoft.AspNetCore.SignalR.Core (2)
Internal\DefaultHubDispatcher.cs (2)
545ErrorMessageHelper.BuildErrorMessage($"An unexpected error occurred invoking '{hubMethodInvocationMessage.Target}' on the server.", ex.InnerException ?? ex, _enableDetailedErrors)); 651var exception = ex.InnerException ?? ex;
Microsoft.AspNetCore.TestHost (2)
src\ab038811704af8d7\HostFactoryResolver.cs (2)
259catch (TargetInvocationException tie) when (tie.InnerException?.GetType().Name == "HostAbortedException") 265exception = tie.InnerException ?? tie;
Microsoft.Build (25)
BackEnd\Components\ProjectCache\ProjectCacheService.cs (2)
424catch (TargetInvocationException e) when (e.InnerException != null) 426HandlePluginException(e.InnerException, "Constructor");
BackEnd\Components\RequestBuilder\TaskBuilder.cs (1)
948exceptionToLog = exceptionToLog.InnerException;
BackEnd\Components\SdkResolution\SdkResolverLoader.cs (2)
334string message = e.InnerException?.Message ?? e.Message; 336ProjectFileErrorUtilities.ThrowInvalidProjectFile(new BuildEventFileInfo(location), e.InnerException ?? e, "CouldNotLoadSdkResolver", type.Name, message);
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (4)
715e.InnerException, 726e.InnerException?.Message); 1356Environment.NewLine + e.InnerException); 1758e.InnerException,
Evaluation\Evaluator.cs (2)
2421if (ex.InnerException != null) 2425importFileUnescaped, ex.InnerException.Message);
Evaluation\Expander.Function.cs (1)
597ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "InvalidFunctionPropertyExpression", partiallyEvaluated, ex.InnerException.Message.Replace("\r\n", " "));
Graph\GraphBuilder.cs (2)
560string innerDetail = ex.InnerException?.Message; 576ex.InnerException);
Instance\TaskFactories\AssemblyTaskFactory.cs (2)
272ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "TaskLoadFailure", taskName, loadInfo.AssemblyLocation, Environment.NewLine + e.InnerException.ToString()); 469ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "TaskLoadFailure", taskName, _loadedType.Assembly.AssemblyLocation, Environment.NewLine + e.InnerException.ToString());
Instance\TaskRegistry.cs (1)
1471ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "TaskFactoryLoadFailure", TaskFactoryAttributeName, taskFactoryLoadInfo.AssemblyLocation, Environment.NewLine + e.InnerException.ToString());
Logging\FileLogger.cs (3)
127throw new LoggerException(message, e.InnerException, errorCode, helpKeyword); 156throw new LoggerException(message, ex.InnerException, errorCode, helpKeyword); 223throw new LoggerException(ex.Message, ex.InnerException, "MSB4128", null);
Logging\LoggerDescription.cs (2)
230throw new LoggerException(message, e.InnerException); 232catch (TargetInvocationException e) when (e.InnerException is LoggerException le)
src\msbuild\src\Shared\TaskLoggingHelper.cs (3)
537while (excep.InnerException != null) 539excep = excep.InnerException; 1667currentException = currentException.InnerException;
Microsoft.Build.Framework (14)
BuildEnvironmentHelper.cs (2)
52if (e.InnerException != null) 56throw e.InnerException;
BuildException\BuildExceptionBase.cs (3)
75writer.Write(exception.InnerException != null); 76if (exception.InnerException != null) 78WriteExceptionToTranslator(translator, exception.InnerException);
src\msbuild\artifacts\.packages\microsoft.codeanalysis.contracts\5.0.0-1.25277.114\contentFiles\cs\net9.0\ErrorReporting\FailFast.cs (1)
74for (Exception? current = exception; current is object; current = current.InnerException)
Telemetry\CrashTelemetry.cs (6)
401InnerExceptionType = exception.InnerException?.GetType().FullName; 424Exception? inner = exception.InnerException; 649Exception? inner = exception.InnerException; 659while (inner.InnerException is not null && depth < maxDepth) 661inner = inner.InnerException; 809if (exception.InnerException?.StackTrace is string innerStack)
Telemetry\CrashTelemetryRecorder.cs (2)
191original.InnerException is not null ? new SanitizedException(original.InnerException) : null)
Microsoft.Build.Tasks.CodeAnalysis (5)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ReflectionUtilities.cs (2)
151Debug.Assert(e.InnerException is object); 152ExceptionDispatchInfo.Capture(e.InnerException).Throw();
src\roslyn\src\Compilers\Shared\CompilerServerLogger.cs (2)
70Exception? e = exception.InnerException; 75e = e.InnerException;
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FailFast.cs (1)
74for (Exception? current = exception; current is object; current = current.InnerException)
Microsoft.Build.Tasks.Core (9)
AssemblyDependency\BadImageReferenceException.cs (2)
38public override string Message => (InnerException == null) ? base.Message : $"{base.Message} {InnerException.Message}";
DownloadFile.cs (4)
249if (actualException is AggregateException aggregateException && aggregateException.InnerException != null) 251actualException = aggregateException.InnerException; 257if (httpRequestException.InnerException != null) 259actualException = httpRequestException.InnerException;
GenerateResource.cs (2)
2676"General.InvalidResxFile", msbuildResXException.InnerException.ToString()); 2681if (ae.InnerException is XmlException xe)
XmlTaskUtility.cs (1)
110for (Exception current = exception; current is not null; current = current.InnerException)
Microsoft.Build.Utilities.Core (3)
src\msbuild\src\Shared\TaskLoggingHelper.cs (3)
537while (excep.InnerException != null) 539excep = excep.InnerException; 1667currentException = currentException.InnerException;
Microsoft.CodeAnalysis (19)
Compilation\Compilation.cs (3)
3358diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_PeWritingFailure, Location.None, e.InnerException?.ToString() ?? "")); 3363diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_CantReadResource, Location.None, e.Message, e.InnerException?.Message ?? "")); 3595diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_PeWritingFailure, Location.None, e.InnerException?.ToString() ?? ""));
Compilation\SourceReferenceResolver.cs (1)
46/// <exception cref="IOException">Error reading file <paramref name="resolvedPath"/>. See <see cref="Exception.InnerException"/> for details.</exception>
Compilation\XmlReferenceResolver.cs (1)
36/// <exception cref="IOException">Error reading file <paramref name="resolvedPath"/>. See <see cref="Exception.InnerException"/> for details.</exception>
DiagnosticAnalyzer\AnalyzerDriver.cs (1)
730var innerException = faultedTask.Exception?.InnerException;
InternalUtilities\ReflectionUtilities.cs (2)
151Debug.Assert(e.InnerException is object); 152ExceptionDispatchInfo.Capture(e.InnerException).Throw();
MetadataReference\AssemblyMetadata.cs (5)
161/// <exception cref="IOException">Error reading file <paramref name="path"/>. See <see cref="Exception.InnerException"/> for details.</exception> 279/// <exception cref="IOException">IO error reading the metadata. See <see cref="Exception.InnerException"/> for details.</exception> 305/// <exception cref="IOException">IO error while reading the metadata. See <see cref="Exception.InnerException"/> for details.</exception> 313/// <exception cref="IOException">IO error while reading the metadata. See <see cref="Exception.InnerException"/> for details.</exception> 408/// <exception cref="IOException">IO error reading the metadata. See <see cref="Exception.InnerException"/> for details.</exception>
MetadataReference\ModuleMetadata.cs (1)
257/// <exception cref="IOException">Error opening file <paramref name="path"/>. See <see cref="Exception.InnerException"/> for details.</exception>
NativePdbWriter\PdbWriter.cs (2)
548catch (SymUnmanagedWriterException e) when (e.InnerException is NotSupportedException) 765catch (SymUnmanagedWriterException e) when (e.InnerException is NotSupportedException)
SourceGeneration\UserFunction.cs (1)
16public new Exception InnerException => base.InnerException!;
src\roslyn\src\Compilers\Core\AnalyzerDriver\AnalyzerExceptionDescriptionBuilder.cs (1)
28return string.Join(s_separator, GetExceptionMessage(exception), CreateDiagnosticDescription(exception.InnerException));
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FailFast.cs (1)
74for (Exception? current = exception; current is object; current = current.InnerException)
Microsoft.CodeAnalysis.Analyzers (6)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ReflectionUtilities.cs (2)
151Debug.Assert(e.InnerException is object); 152ExceptionDispatchInfo.Capture(e.InnerException).Throw();
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FailFast.cs (1)
74for (Exception? current = exception; current is object; current = current.InnerException)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectReader.cs (2)
71catch (AggregateException ex) when (ex.InnerException is not null) 79ExceptionDispatchInfo.Capture(ex.InnerException).Throw();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
53ExceptionDispatchInfo.Capture(ex.InnerException ?? ex).Throw();
Microsoft.CodeAnalysis.AnalyzerUtilities (6)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ReflectionUtilities.cs (2)
151Debug.Assert(e.InnerException is object); 152ExceptionDispatchInfo.Capture(e.InnerException).Throw();
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FailFast.cs (1)
74for (Exception? current = exception; current is object; current = current.InnerException)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectReader.cs (2)
71catch (AggregateException ex) when (ex.InnerException is not null) 79ExceptionDispatchInfo.Capture(ex.InnerException).Throw();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
53ExceptionDispatchInfo.Capture(ex.InnerException ?? ex).Throw();
Microsoft.CodeAnalysis.CodeStyle (6)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ReflectionUtilities.cs (2)
151Debug.Assert(e.InnerException is object); 152ExceptionDispatchInfo.Capture(e.InnerException).Throw();
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FailFast.cs (1)
74for (Exception? current = exception; current is object; current = current.InnerException)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectReader.cs (2)
71catch (AggregateException ex) when (ex.InnerException is not null) 79ExceptionDispatchInfo.Capture(ex.InnerException).Throw();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
53ExceptionDispatchInfo.Capture(ex.InnerException ?? ex).Throw();
Microsoft.CodeAnalysis.Extensions.Package (1)
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FailFast.cs (1)
74for (Exception? current = exception; current is object; current = current.InnerException)
Microsoft.CodeAnalysis.Features (1)
src\roslyn\src\Compilers\Core\AnalyzerDriver\AnalyzerExceptionDescriptionBuilder.cs (1)
28return string.Join(s_separator, GetExceptionMessage(exception), CreateDiagnosticDescription(exception.InnerException));
Microsoft.CodeAnalysis.ResxSourceGenerator (6)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ReflectionUtilities.cs (2)
151Debug.Assert(e.InnerException is object); 152ExceptionDispatchInfo.Capture(e.InnerException).Throw();
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FailFast.cs (1)
74for (Exception? current = exception; current is object; current = current.InnerException)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectReader.cs (2)
71catch (AggregateException ex) when (ex.InnerException is not null) 79ExceptionDispatchInfo.Capture(ex.InnerException).Throw();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
53ExceptionDispatchInfo.Capture(ex.InnerException ?? ex).Throw();
Microsoft.CodeAnalysis.Scripting (5)
Hosting\AssemblyLoader\MetadataShadowCopyProvider.cs (2)
229/// <exception cref="IOException">Error reading file <paramref name="fullPath"/>. See <see cref="Exception.InnerException"/> for details.</exception> 287/// <exception cref="IOException">Error reading file <paramref name="fullPath"/>. See <see cref="Exception.InnerException"/> for details.</exception>
Hosting\CommandLine\CommandLineRunner.cs (2)
348if (e is FileLoadException && e.InnerException is InteractiveAssemblyLoaderException) 350Console.Error.WriteLine(e.InnerException.Message);
Hosting\ObjectFormatter\ObjectFormatterHelpers.cs (1)
269exception = e.InnerException;
Microsoft.CodeAnalysis.Workspaces (6)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ReflectionUtilities.cs (2)
151Debug.Assert(e.InnerException is object); 152ExceptionDispatchInfo.Capture(e.InnerException).Throw();
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FailFast.cs (1)
74for (Exception? current = exception; current is object; current = current.InnerException)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectReader.cs (2)
71catch (AggregateException ex) when (ex.InnerException is not null) 77ExceptionDispatchInfo.Throw(ex.InnerException);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
53ExceptionDispatchInfo.Capture(ex.InnerException ?? ex).Throw();
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
Rpc\RpcServer.cs (1)
184e = e.InnerException ?? e;
Microsoft.CodeAnalysis.Workspaces.MSBuild.Contracts (1)
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FailFast.cs (1)
74for (Exception? current = exception; current is object; current = current.InnerException)
Microsoft.DotNet.ApiCompat.Task (2)
src\sdk\src\Tasks\Common\TaskBase.cs (2)
93if (e.InnerException != null) 95s = s + " ---> " + ExceptionToStringWithoutMessage(e.InnerException) + Environment.NewLine +
Microsoft.DotNet.Arcade.Sdk (2)
src\DownloadFile.cs (2)
161if (e.InnerException is OperationCanceledException) 167throw e.InnerException;
Microsoft.DotNet.Build.Tasks.Installers (1)
src\ExecWithRetries.cs (1)
107catch (AggregateException e) when (e.InnerException is TaskCanceledException)
Microsoft.DotNet.HotReload.Watch (2)
src\sdk\src\Dotnet.Watch\AspireService\Helpers\ExceptionExtensions.cs (2)
37if (ex.InnerException != null) 40msg += ex.InnerException.Message;
Microsoft.Extensions.AI.Abstractions (2)
Functions\AIFunctionFactory.cs (2)
1361catch (TargetInvocationException e) when (e.InnerException is not null) 1366System.Runtime.ExceptionServices.ExceptionDispatchInfo.Capture(e.InnerException).Throw();
Microsoft.Extensions.AI.Abstractions.Tests (1)
Contents\FunctionCallContentTests.cs (1)
395Assert.Same(exc, content.Exception.InnerException);
Microsoft.Extensions.Diagnostics.ExceptionSummarization (5)
ExceptionSummarizer.cs (5)
51if (exception.InnerException != null) 53var innerExceptionType = exception.InnerException.GetType(); 57exception.InnerException, 65var exceptionDescription = exception.InnerException != null 66? exception.InnerException.GetType().Name
Microsoft.Extensions.Diagnostics.ExceptionSummarization.Tests (10)
ExceptionSummarizerTests.cs (10)
88if (exception.InnerException != null) 91.Setup(mock => mock.Describe(exception.InnerException, out additionalDetails)) 166if (exception.InnerException != null) 169.Setup(mock => mock.Describe(exception.InnerException, out additionalDetails)) 189if (exception.InnerException != null) 192.Setup(mock => mock.Describe(exception.InnerException, out additionalDetails)) 223if (exception.InnerException != null) 226.Setup(mock => mock.Describe(exception.InnerException, out additionalDetails)) 248if (exception.InnerException != null) 251.Setup(mock => mock.Describe(exception.InnerException, out additionalDetails))
Microsoft.Extensions.Http.Resilience (1)
Polly\HttpClientResiliencePredicates.cs (1)
55&& outcome.Exception is OperationCanceledException { Source: "System.Private.CoreLib", InnerException: TimeoutException };
Microsoft.Extensions.Telemetry (2)
Logging\ExtendedLogger.cs (2)
209else if (exception.InnerException != null) 211HandleException(exception.InnerException, indent + IndentAmount);
Microsoft.Extensions.VectorData.ConformanceTests (1)
FilterTests.cs (1)
137if (exception is not InvalidOperationException and not VectorStoreException { InnerException: InvalidOperationException })
Microsoft.JSInterop (3)
Infrastructure\DotNetDispatcher.cs (3)
195if (tie.InnerException != null) 197ExceptionDispatchInfo.Capture(tie.InnerException).Throw(); 198throw tie.InnerException; // Unreachable
Microsoft.Maui.Controls (4)
BindingExpression.cs (4)
731 if (ex.InnerException is KeyNotFoundException || ex.InnerException is IndexOutOfRangeException || ex.InnerException is ArgumentOutOfRangeException) 737 throw ex.InnerException;
Microsoft.Maui.Controls.Build.Tasks (4)
NodeILExtensions.cs (4)
170 catch (System.Reflection.TargetInvocationException tie) when (tie.InnerException is XamlParseException) 172 throw tie.InnerException; 174 catch (System.Reflection.TargetInvocationException tie) when (tie.InnerException is BuildException) 176 throw tie.InnerException;
Microsoft.Maui.Controls.Xaml (3)
CreateValuesVisitor.cs (3)
115 catch (TargetInvocationException e) when (e.InnerException is XamlParseException || e.InnerException is XmlException) 117 throw e.InnerException;
Microsoft.ML.AutoML (4)
API\BinaryClassificationExperiment.cs (1)
462throw new OperationCanceledException(ex.Message, ex.InnerException);
API\MulticlassClassificationExperiment.cs (1)
440throw new OperationCanceledException(ex.Message, ex.InnerException);
API\RegressionExperiment.cs (1)
455throw new OperationCanceledException(ex.Message, ex.InnerException);
AutoMLExperiment\Runner\SweepablePipelineRunner.cs (1)
108throw new OperationCanceledException(ex.Message, ex.InnerException);
Microsoft.ML.Core (2)
ComponentModel\ComponentCatalog.cs (2)
251if (ex.InnerException != null && ex.InnerException.IsMarked())
Microsoft.ML.Maml (5)
MAML.cs (5)
163for (var e = ex; e != null; e = e.InnerException) 235/// <see cref="Exception.InnerException"/> chain. 245for (var e = ex; e != null; e = e.InnerException) 256/// <see cref="Exception.InnerException"/> chain. 263for (var e = ex; e != null; e = e.InnerException)
Microsoft.ML.TestFramework (2)
DataPipe\TestDataPipeBase.cs (2)
52for (e = ex; e.InnerException != null; e = e.InnerException)
Microsoft.ML.Tests (7)
DatabaseLoaderTests.cs (1)
108Assert.Contains("Timeout", ex.InnerException.Message);
Scenarios\GetColumnTests.cs (2)
107for (e = ex; e.InnerException != null; e = e.InnerException)
SvmLightTests.cs (4)
247Assert.Contains("Duplicate keys found in dataset", ex.InnerException.Message); 362Assert.Contains("Encountered 0 index while parsing a 1-based dataset", ex.InnerException.Message); 381Assert.Contains("Encountered non-parsable index '-1' while parsing dataset", ex.InnerException.Message); 400Assert.Contains("Encountered non-parsable index 'a' while parsing dataset", ex.InnerException.Message);
Microsoft.NET.Build.Containers (4)
AmazonECRMessageHandler.cs (1)
26catch (HttpRequestException e) when (e.InnerException is IOException ioe && ioe.Message.Equals("The response ended prematurely.", StringComparison.OrdinalIgnoreCase))
AuthHandshakeMessageHandler.cs (2)
616catch (HttpRequestException e) when (e.InnerException is IOException ioe && ioe.InnerException is SocketException se)
ImagePublisher.cs (1)
124catch (AggregateException ex) when (ex.InnerException is DockerLoadException dle)
Microsoft.NET.Build.Extensions.Tasks (2)
src\sdk\src\Tasks\Common\TaskBase.cs (2)
93if (e.InnerException != null) 95s = s + " ---> " + ExceptionToStringWithoutMessage(e.InnerException) + Environment.NewLine +
Microsoft.NET.Build.Tasks (5)
CreateAppHost.cs (3)
111(ex is AggregateException && (ex.InnerException is IOException || ex.InnerException is UnauthorizedAccessException))) 123message = ex.InnerException.Message;
src\sdk\src\Tasks\Common\TaskBase.cs (2)
93if (e.InnerException != null) 95s = s + " ---> " + ExceptionToStringWithoutMessage(e.InnerException) + Environment.NewLine +
Microsoft.NET.Sdk.Publish.Tasks (9)
MsDeploy\CommonUtility.cs (6)
1547if (e.InnerException != null) 1548e = e.InnerException; 1562while (rootException != null && rootException.InnerException != null) 1564rootException = rootException.InnerException; 1669if (e.InnerException == null) 1682currentException = currentException.InnerException;
Tasks\MsDeploy\VsMsdeploy.cs (2)
866if (e.InnerException != null) 867e = e.InnerException;
Tasks\Xdt\TaskTransformationLogger.cs (1)
168exIterator = exIterator.InnerException;
Microsoft.NET.Sdk.Razor.Tasks (2)
src\sdk\src\RazorSdk\Tool\ServerProtocol\ServerLogger.cs (2)
83e = e.InnerException; 87e = e.InnerException;
Microsoft.Private.Windows.Core (2)
System\ExceptionExtensions.cs (1)
34ex = targetException.InnerException ?? ex;
System\Private\Windows\Ole\BinaryFormatUtilities.cs (1)
235catch (SerializationException e) when (e.InnerException is NotSupportedException nse)
Microsoft.TemplateEngine.Cli (10)
Commands\BaseCommand.cs (6)
259while (ax != null && ax.InnerExceptions.Count == 1 && ax.InnerException is not null) 261ex = ax.InnerException; 267while (ex.InnerException != null) 269ex = ex.InnerException; 272while (ax != null && ax.InnerExceptions.Count == 1 && ax.InnerException is not null) 274ex = ax.InnerException;
TemplateInvoker.cs (4)
70if (cx.InnerException != null) 72Reporter.Error.WriteLine(cx.InnerException.Message.Bold().Red()); 182if (cx.InnerException != null) 184Reporter.Error.WriteLine(cx.InnerException.Message.Bold().Red());
Microsoft.TemplateEngine.Edge (4)
Installers\NuGet\NugetApiPackageManager.cs (1)
182throw new DownloadException(packageMetadata.Identity.Id, packageMetadata.Identity.Version.ToNormalizedString(), new[] { source.Source }, e.InnerException);
Template\TemplateCreator.cs (1)
259e = e.InnerException;
TemplateConstraintManager.cs (2)
122var exception = task.Exception is not null ? task.Exception.InnerException ?? task.Exception : task.Exception; 197var exception = task.Exception is not null ? task.Exception.InnerException ?? task.Exception : task.Exception;
Microsoft.TestPlatform.CommunicationUtilities (9)
_generated\92\TestPlatformJsonContext.Exception.g.cs (2)
121Getter = static obj => ((global::System.Exception)obj).InnerException, 235ExceptionSerializeHandler(writer, ((global::System.Exception)value).InnerException);
Json\Jsonite\Jsonite.cs (1)
1406var innerMessage = InnerException != null ? " Check inner exception for more details" : string.Empty;
Serialization\ExceptionConverter.cs (4)
87if (value.InnerException is null) 93StjSafe.Serialize(writer, value.InnerException, options); 135if (InnerException is not null) 137sb.Append(" ---> ").Append(InnerException).AppendLine()
SocketCommunicationManager.cs (1)
375if (ioException.InnerException is SocketException socketException
TcpClientExtensions.cs (1)
72if (ioException.InnerException is SocketException socketException
Microsoft.TestPlatform.CoreUtilities (2)
Tracing\EqtTrace.cs (2)
759if (exceptionToTrace.InnerException != null) 763Exception inner = exceptionToTrace.InnerException;
Microsoft.TestPlatform.CrossPlatEngine (1)
Execution\BaseRunTests.cs (1)
228TargetInvocationException { InnerException: { } inner } => inner,
Microsoft.VisualBasic.Core (13)
Microsoft\VisualBasic\CompilerServices\IDOBinder.vb (2)
1465Throw ie.InnerException 1492Throw ie.InnerException
Microsoft\VisualBasic\CompilerServices\LateBinding.vb (9)
176Throw ex.InnerException 202(TypeOf ex.InnerException Is COMException AndAlso 203CType(ex.InnerException, COMException).ErrorCode = DISP_E_NOTACOLLECTION) Then 463If ex.InnerException Is Nothing Then 465ElseIf TypeOf ex.InnerException Is TargetParameterCountException Then 474Throw ex.InnerException 651Throw ex.InnerException 898Throw ex.InnerException 1047Throw ex.InnerException
Microsoft\VisualBasic\CompilerServices\Symbols.vb (2)
1287Catch ex As TargetInvocationException When ex.InnerException IsNot Nothing 1289Throw ex.InnerException
Microsoft.VisualStudio.TestPlatform.Common (3)
Utilities\ExceptionUtilities.cs (2)
29var inner = exception.InnerException; 36inner = inner.InnerException;
Utilities\MetadataReaderHelper.cs (1)
192current = current.InnerException;
MSBuild (16)
OutOfProcTaskAppDomainWrapperBase.cs (3)
138Exception exceptionToReturn = e is TargetInvocationException ? e.InnerException : e; 372exceptionToReturn = e.InnerException; 394e is TargetInvocationException ? e.InnerException : e,
XMake.cs (13)
1237if (e.InnerException != null) 1241Console.WriteLine(e.InnerException.ToString()); 1259Console.WriteLine(e.InnerException.ToString()); 1266$"MSBUILD : error {e.ErrorCode}: {e.Message}{(e.InnerException != null ? $" {e.InnerException.Message}" : "")}"); 1282if (!(pce?.HasBeenLoggedByProjectCache ?? exppce.HasBeenLoggedByProjectCache) && e.InnerException != null) 1288if (e.InnerException is not null) 1290Console.WriteLine(e.InnerException.ToString()); 1300$"MSBUILD : error {e.ErrorCode}: {e.Message}{(e.InnerException != null ? $" {e.InnerException.Message}" : string.Empty)}"); 1308$"{e.Message}{(e.InnerException != null ? $" {e.InnerException.Message}" : string.Empty)}"); 4479InitializationException.Throw("LoggerFatalError", unquotedParameter, e.InnerException, true);
NuGet.Build.Tasks (2)
RestoreTask.cs (1)
159catch (AggregateException ex) when (_cts.Token.IsCancellationRequested && ex.InnerException is OperationCanceledException)
StaticGraphRestoreTaskBase.cs (1)
193|| (e is AggregateException aggregateException && aggregateException.InnerException is OperationCanceledException))
NuGet.Commands (2)
RestoreCommand\SourceRepositoryDependencyProvider.cs (2)
731currentException = currentException.InnerException; 748e = e.InnerException;
NuGet.Common (4)
ExceptionUtilities.cs (4)
113if (exception.InnerException == null) 158if (exception.InnerException != null) 160return GetMessages(exception.InnerException); 179current = current.InnerException;
NuGet.PackageManagement (3)
Utility\ExceptionUtility.cs (3)
20while (exception.InnerException != null) 22exception = exception.InnerException; 35if (exception.InnerException == null)
NuGet.Protocol (19)
LocalRepositories\LocalDownloadResource.cs (1)
81throw new FatalProtocolException(ex.Message, ex.InnerException ?? ex);
Providers\ServiceIndexResourceV3Provider.cs (6)
171if (ex.InnerException != null && 172ex.InnerException is IOException && 173ex.InnerException.InnerException != null && 174ex.InnerException.InnerException is System.Net.Sockets.SocketException)
RemoteRepositories\HttpFileSystemBasedFindPackageByIdResource.cs (6)
554if (ex.InnerException != null && 555ex.InnerException is IOException && 556ex.InnerException.InnerException != null && 557ex.InnerException.InnerException is System.Net.Sockets.SocketException)
Utility\FindPackagesByIdNupkgDownloader.cs (6)
304if (ex.InnerException != null && 305ex.InnerException is IOException && 306ex.InnerException.InnerException != null && 307ex.InnerException.InnerException is System.Net.Sockets.SocketException)
PresentationBuildTasks (12)
MS\Internal\Tasks\CompilerWrapper.cs (1)
335e = e.InnerException;
MS\Internal\Tasks\TaskHelper.cs (2)
195while (e.InnerException != null) 197Exception eInner = e.InnerException;
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\BamlRecordWriter.cs (1)
90_xamlTypeMapper.ThrowExceptionWithLine(e.Message, e.InnerException);
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlParseException.cs (2)
454if (innerException is TargetInvocationException && innerException.InnerException is XamlParseException) 456xamlParseException = (XamlParseException)innerException.InnerException;
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlParser.cs (2)
208if (e is TargetInvocationException && e.InnerException is XamlParseException) 210throw e.InnerException;
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (2)
1391if (innerException is TargetInvocationException && innerException.InnerException is XamlParseException) 1393parseException = innerException.InnerException as XamlParseException;
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\CriticalExceptions.cs (2)
49while (ex.InnerException is not null && 53ex = ex.InnerException;
PresentationFramework (17)
MS\Internal\PtsHost\Pts.cs (7)
136innerException = exception.InnerException; 275get { return InnerException.HelpLink; } 276set { InnerException.HelpLink = value; } 281get { return InnerException.Message; } 286get { return InnerException.Source; } 287set { InnerException.Source = value; } 292get { return InnerException.StackTrace; }
System\Windows\Markup\BamlRecordReader.cs (6)
1543e = tie.InnerException; 2488e = tie.InnerException; 2661e = tie.InnerException; 2903e = tie.InnerException; 3718e = tie.InnerException; 3856e = tie.InnerException;
System\Windows\Markup\BamlRecordWriter.cs (1)
90_xamlTypeMapper.ThrowExceptionWithLine(e.Message, e.InnerException);
System\Windows\Markup\XamlParseException.cs (2)
454if (innerException is TargetInvocationException && innerException.InnerException is XamlParseException) 456xamlParseException = (XamlParseException)innerException.InnerException;
System\Windows\Markup\XamlReader.cs (1)
514Exception baseException = e.InnerException ?? e;
ReachFramework (4)
PrintConfig\PrtCap_Public_Simple.cs (1)
195/// <see cref="Exception.InnerException"/> property provides more details.
PrintConfig\PrtCap_Public.cs (1)
40/// null, the exception object's <see cref="Exception.InnerException"/> property provides more details.
PrintConfig\PrtTicket_Public_Simple.cs (1)
264/// <see cref="Exception.InnerException"/> property provides more details.
PrintConfig\PrtTicket_Public.cs (1)
59/// And if not null, the exception object's <see cref="Exception.InnerException"/> property provides more details.
Roslyn.Diagnostics.Analyzers (6)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ReflectionUtilities.cs (2)
151Debug.Assert(e.InnerException is object); 152ExceptionDispatchInfo.Capture(e.InnerException).Throw();
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FailFast.cs (1)
74for (Exception? current = exception; current is object; current = current.InnerException)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectReader.cs (2)
71catch (AggregateException ex) when (ex.InnerException is not null) 79ExceptionDispatchInfo.Capture(ex.InnerException).Throw();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
53ExceptionDispatchInfo.Capture(ex.InnerException ?? ex).Throw();
rzc (3)
Application.cs (1)
56catch (AggregateException ex) when (ex.InnerException != null)
ServerProtocol\ServerLogger.cs (2)
83e = e.InnerException; 87e = e.InnerException;
Security.TransportSecurity.IntegrationTests (10)
Https\HttpsTests.4.1.0.cs (8)
97for (Exception innerException = ex.InnerException; innerException != null; innerException = innerException.InnerException) 136for (Exception innerException = ex.InnerException; innerException != null; innerException = innerException.InnerException) 175for (Exception innerException = ex.InnerException; innerException != null; innerException = innerException.InnerException) 214for (Exception innerException = ex.InnerException; innerException != null; innerException = innerException.InnerException)
Tcp\ClientCredentialTypeCertificateCanonicalNameTests.4.1.0.cs (2)
72if ((exception is MessageSecurityException) || (exception is CommunicationException) && !string.Equals(exception.InnerException.GetType().ToString(), "System.ServiceModel.Security.MessageSecurityException")) 149if ((exception is MessageSecurityException) || (exception is CommunicationException) && !string.Equals(exception.InnerException.GetType().ToString(), "System.ServiceModel.Security.MessageSecurityException"))
Shared.Tests (2)
Throw\ThrowTest.cs (2)
33Assert.Equal(innerException, exception.InnerException); 57Assert.Equal(innerException, exception.InnerException);
System.ComponentModel.Annotations (1)
System\ComponentModel\DataAnnotations\CustomValidationAttribute.cs (1)
183throw tie.InnerException!;
System.ComponentModel.Composition (27)
System\ComponentModel\Composition\CompositionContractMismatchException.cs (1)
52/// the <see cref="Exception.InnerException"/> property to <see langword="null"/>.
System\ComponentModel\Composition\CompositionException.cs (4)
61/// the <see cref="Exception.InnerException"/> property to <see langword="null"/>. 286if (exception.InnerException != null) 288VisitException(exception.InnerException, context); 318VisitError(new CompositionError(exception.Message, exception.InnerException), context);
System\ComponentModel\Composition\ImportCardinalityMismatchException.cs (1)
55/// the <see cref="Exception.InnerException"/> property to <see langword="null"/>.
System\ComponentModel\Composition\ImportCardinalityMismatchExceptionDebuggerProxy.cs (1)
21get { return _exception.InnerException; }
System\ComponentModel\Composition\MetadataViewProvider.cs (10)
100if (ex.InnerException!.GetType() == typeof(InvalidCastException)) 105ex.InnerException.Data[MetadataViewGenerator.MetadataViewType], 106ex.InnerException.Data[MetadataViewGenerator.MetadataItemKey], 107ex.InnerException.Data[MetadataViewGenerator.MetadataItemValue], 108ex.InnerException.Data[MetadataViewGenerator.MetadataItemSourceType], 109ex.InnerException.Data[MetadataViewGenerator.MetadataItemTargetType]), ex); 111else if (ex.InnerException.GetType() == typeof(NullReferenceException)) 116ex.InnerException.Data[MetadataViewGenerator.MetadataViewType], 117ex.InnerException.Data[MetadataViewGenerator.MetadataItemKey], 118ex.InnerException.Data[MetadataViewGenerator.MetadataItemTargetType]), ex);
System\ComponentModel\Composition\Primitives\ComposablePartException.cs (2)
107/// the <see cref="Exception.InnerException"/> property to <see langword="null"/>. 133/// the <see cref="Exception.InnerException"/> property to <see langword="null"/>.
System\ComponentModel\Composition\Primitives\ComposablePartExceptionDebuggerProxy.cs (1)
26get { return _exception.InnerException; }
System\ComponentModel\Composition\ReflectionModel\ExportingMember.cs (2)
58exception.InnerException); 70exception.InnerException);
System\ComponentModel\Composition\ReflectionModel\ImportingMember.cs (4)
75exception.InnerException); 87exception.InnerException); 139exception.InnerException); 162exception.InnerException);
System\ComponentModel\Composition\ReflectionModel\ReflectionComposablePart.cs (1)
430exception = ex.InnerException;
System.ComponentModel.TypeConverter (4)
System\ComponentModel\LicenseManager.cs (1)
152throw e.InnerException!;
System\ComponentModel\ReflectPropertyDescriptor.cs (3)
935t = t.InnerException!; 1135if (t is TargetInvocationException && t.InnerException != null) 1138throw t.InnerException;
System.Configuration.ConfigurationManager (7)
System\Configuration\ConfigurationErrorsException.cs (2)
83this(e?.BareMessage, e?.InnerException, e?.Filename, e?.Line ?? 0) 171ConfigurationErrorsException e = new ConfigurationErrorsException(BareMessage, InnerException,
System\Configuration\ExceptionUtil.cs (1)
58deprecatedException.InnerException,
System\Diagnostics\TraceUtils.cs (4)
112Debug.Assert(tiexc.InnerException != null, "ill-formed TargetInvocationException!"); 113innerException = tiexc.InnerException; 127Debug.Assert(tiexc.InnerException != null, "ill-formed TargetInvocationException!"); 128innerException = tiexc.InnerException;
System.Data.Odbc (1)
Common\System\Data\ProviderBase\DbConnectionFactory.cs (1)
112retry.TrySetException(task.Exception!.InnerException!);
System.Data.OleDb (1)
System\Data\ProviderBase\DbConnectionFactory.cs (1)
228retry.TrySetException(task.Exception!.InnerException!);
System.Diagnostics.Process (1)
src\runtime\src\libraries\Common\src\Interop\Linux\procfs\Interop.ProcFsStat.TryReadStatusFile.cs (1)
170catch (Exception ex) when (ex is IOException || ex.InnerException is IOException)
System.DirectoryServices (3)
System\DirectoryServices\DirectoryEntry.cs (3)
790if (e.InnerException is COMException inner) 823if (e.InnerException is COMException inner) 852if (e.InnerException is COMException inner)
System.DirectoryServices.AccountManagement (14)
System\DirectoryServices\AccountManagement\AD\ADAMStoreCtx.cs (2)
200if (e.InnerException is System.Runtime.InteropServices.COMException) 202throw (ExceptionHelper.GetExceptionFromCOMException((System.Runtime.InteropServices.COMException)e.InnerException));
System\DirectoryServices\AccountManagement\AD\SDSUtils.cs (10)
320if (e.InnerException is System.Runtime.InteropServices.COMException) 322if (((System.Runtime.InteropServices.COMException)e.InnerException).ErrorCode == unchecked((int)ExceptionHelper.ERROR_HRESULT_CONSTRAINT_VIOLATION)) 326throw (new PasswordException(((System.Runtime.InteropServices.COMException)e.InnerException).Message, (System.Runtime.InteropServices.COMException)e.InnerException)); 330throw (ExceptionHelper.GetExceptionFromCOMException((System.Runtime.InteropServices.COMException)e.InnerException)); 354if (e.InnerException is System.Runtime.InteropServices.COMException) 356if (((System.Runtime.InteropServices.COMException)e.InnerException).ErrorCode == unchecked((int)ExceptionHelper.ERROR_HRESULT_CONSTRAINT_VIOLATION)) 360throw (new PasswordException(((System.Runtime.InteropServices.COMException)e.InnerException).Message, (System.Runtime.InteropServices.COMException)e.InnerException)); 364throw (ExceptionHelper.GetExceptionFromCOMException((System.Runtime.InteropServices.COMException)e.InnerException));
System\DirectoryServices\AccountManagement\SAM\SAMStoreCtx.cs (2)
399if (e.InnerException is System.Runtime.InteropServices.COMException) 401throw (ExceptionHelper.GetExceptionFromCOMException((System.Runtime.InteropServices.COMException)e.InnerException));
System.Linq.Expressions (2)
System\Linq\Expressions\Interpreter\CallInstruction.cs (1)
97if (!(tie.InnerException is NotSupportedException))
System\Linq\Expressions\Interpreter\Utilities.cs (1)
163ExceptionDispatchInfo.Throw(exception.InnerException!);
System.Net.Http (5)
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (1)
877TimeoutException te = new TimeoutException(SR.net_http_connect_timedout, oce.InnerException);
System\Net\Http\SocketsHttpHandler\Http3Connection.cs (2)
157Trace($"{nameof(QuicConnection)} failed to close: {closeTask.Exception!.InnerException}"); 497if (t.Exception?.InnerException is QuicException ex && ex.QuicError == QuicError.StreamAborted)
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (1)
516catch (HttpRequestException hex) when (hex.InnerException is QuicException qex && qex.QuicError == QuicError.StreamAborted && qex.ApplicationErrorCode == (long)Http3ErrorCode.NoError)
System\Net\Http\SocketsHttpHandler\HttpConnectionBase.cs (1)
331Exception? e = task.Exception!.InnerException; // Access Exception even if not tracing, to avoid TaskScheduler.UnobservedTaskException firing
System.Net.HttpListener (6)
System\Net\Managed\HttpRequestStream.Managed.cs (3)
196catch (IOException e) when (e.InnerException is ArgumentException || e.InnerException is InvalidOperationException) 198ExceptionDispatchInfo.Throw(e.InnerException);
System\Net\Managed\HttpResponseStream.Managed.cs (3)
287if (ex.InnerException is ArgumentException || ex.InnerException is InvalidOperationException) 289ExceptionDispatchInfo.Throw(ex.InnerException);
System.Net.NameResolution (3)
System\Net\Dns.cs (1)
133Exception? ex = t.Exception?.InnerException;
System\Net\DnsSocket.cs (2)
107catch (TargetInvocationException e) when (e.InnerException is not null) 109ExceptionDispatchInfo.Throw(e.InnerException);
System.Net.NetworkInformation (1)
System\Net\NetworkInformation\LinuxIPv4InterfaceProperties.cs (1)
55catch (NetworkInformationException ex) when (ex.InnerException is IOException or UnauthorizedAccessException) { }
System.Net.Quic (5)
System\Net\Quic\QuicConnection.cs (2)
577catch (ChannelClosedException ex) when (ex.InnerException is not null) 579ExceptionDispatchInfo.Throw(ex.InnerException);
System\Net\Quic\QuicListener.cs (3)
195catch (ChannelClosedException ex) when (ex.InnerException is not null) 197ExceptionDispatchInfo.Throw(ex.InnerException); 302if (task.AsTask().Exception?.InnerException is Exception handshakeException)
System.Net.Requests (3)
System\Net\FtpWebRequest.cs (2)
918if (webException.InnerException is IOException ioEx && 919ioEx.InnerException is SocketException sEx &&
System\Net\WebException.cs (1)
105SocketException? socketException = ex.InnerException as SocketException;
System.Net.Sockets (2)
System\Net\Sockets\Socket.cs (1)
4083return t.Exception.InnerException switch
System\Net\Sockets\Socket.Unix.cs (1)
299catch (TargetInvocationException ex) when (ex.InnerException is SocketException se && se.SocketErrorCode == SocketError.OperationNotSupported)
System.Net.WebSockets (3)
System\Net\WebSockets\Compression\WebSocketDeflater.cs (1)
218throw new WebSocketException(ex.Message, ex.InnerException);
System\Net\WebSockets\Compression\WebSocketInflater.cs (1)
277throw new WebSocketException(ex.Message, ex.InnerException);
System\Net\WebSockets\ManagedWebSocket.cs (1)
1912Exception e = task.Exception!.InnerException!;
System.Private.CoreLib (21)
src\runtime\src\libraries\Common\src\Interop\Linux\procfs\Interop.ProcFsStat.TryReadStatusFile.cs (1)
170catch (Exception ex) when (ex is IOException || ex.InnerException is IOException)
src\runtime\src\libraries\System.Private.CoreLib\src\System\AggregateException.cs (2)
230back = back!.InnerException; 373if (_innerExceptions[i] == InnerException)
src\runtime\src\libraries\System.Private.CoreLib\src\System\BadImageFormatException.cs (2)
106if (InnerException != null) 107s += InnerExceptionPrefix + InnerException.ToString();
src\runtime\src\libraries\System.Private.CoreLib\src\System\ComponentModel\Win32Exception.cs (1)
113Exception? innerException = InnerException;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Exception.cs (2)
71Exception? inner = InnerException; 77inner = inner.InnerException;
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\DirectoryNotFoundException.cs (2)
61if (InnerException is not null) 62s += Environment.NewLineConst + InnerExceptionPrefix + InnerException.ToString();
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\FileLoadException.cs (2)
61if (InnerException != null) 62s += Environment.NewLineConst + InnerExceptionPrefix + InnerException.ToString();
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\FileNotFoundException.cs (2)
84if (InnerException != null) 85s += Environment.NewLineConst + InnerExceptionPrefix + InnerException.ToString();
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\InvalidDataException.cs (3)
34/// An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the <see cref="Exception.InnerException" /> property. The <see cref="Exception.InnerException" /> property returns the same value that is passed into the constructor, or <see langword="null" /> if the <see cref="Exception.InnerException" /> property does not supply the inner exception value to the constructor.</remarks>
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\COMException.cs (1)
62Exception? innerException = InnerException;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ExternalException.cs (1)
61Exception? innerException = InnerException;
System\CrashInfo.cs (2)
208if (aggregate is not null || exception.InnerException is not null) 224WriteExceptionWithFallback(default, exception.InnerException, maxMessageSize, maxNumberStackFrames, maxMethodNameSize);
System.Private.DataContractSerialization (3)
System\Runtime\Serialization\ExceptionUtility.cs (1)
28exception = exception.InnerException!;
System\Xml\ValueHandle.cs (1)
463throw new XmlException(exception.Message, exception.InnerException);
System\Xml\XmlBaseReader.cs (1)
1512throw new XmlException(exception.Message, exception.InnerException);
System.Private.Windows.Core (2)
System\ExceptionExtensions.cs (1)
34ex = targetException.InnerException ?? ex;
System\Private\Windows\Ole\BinaryFormatUtilities.cs (1)
235catch (SerializationException e) when (e.InnerException is NotSupportedException nse)
System.Private.Windows.Core.TestUtilities (6)
TestAccessor.cs (6)
143catch (TargetInvocationException ex) when (ex.InnerException is not null) 146ExceptionDispatchInfo.Capture(ex.InnerException).Throw(); 174catch (TargetInvocationException ex) when (ex.InnerException is not null) 177ExceptionDispatchInfo.Capture(ex.InnerException).Throw(); 202catch (TargetInvocationException ex) when (ex.InnerException is not null) 205ExceptionDispatchInfo.Capture(ex.InnerException).Throw();
System.Private.Xml (5)
System\Xml\Serialization\XmlSerializer.cs (2)
415e = e.InnerException; 517e = e.InnerException;
System\Xml\Xsl\Runtime\XmlExtensionFunction.cs (1)
290throw new XslTransformException(e.InnerException, SR.XmlIl_ExtensionError, _name);
System\Xml\Xsl\XslException.cs (2)
89if (InnerException != null) 91result += $" ---> {InnerException}{Environment.NewLine} {CreateMessage(SR.Xml_EndOfInnerExceptionStack)}";
System.Resources.Extensions (2)
System\Resources\Extensions\BinaryFormat\BinaryFormattedObject.cs (2)
57throw ExceptionDispatchInfo.Capture(ex.InnerException!).SourceException.ConvertToSerializationException(); 78throw ExceptionDispatchInfo.Capture(ex.InnerException!).SourceException.ConvertToSerializationException();
System.Runtime.InteropServices.JavaScript (2)
System\Runtime\InteropServices\JavaScript\JSHostImplementation.cs (2)
268if (ex is TargetInvocationException refEx && refEx.InnerException != null) 269ex = refEx.InnerException;
System.Runtime.Serialization.Schema (1)
System\Runtime\Serialization\Schema\DiagnosticUtility.cs (1)
30exception = exception.InnerException!;
System.Security.Cryptography.Cose (1)
System\Security\Cryptography\Cose\CoseMessage.cs (1)
326throw new CryptographicException(e.Message, e.InnerException);
System.ServiceModel.Federation (3)
System\Runtime\Fx.cs (1)
26exception = exception.InnerException;
System\Runtime\TaskHelpers.cs (2)
48tcsObj.TrySetException(antecedent.Exception.InnerException); 104tcsObj.TrySetException(antecedent.Exception.InnerException);
System.ServiceModel.Http (5)
System\ServiceModel\Channels\HttpChannelHelpers.cs (5)
105var inner = requestException.InnerException; 119Contract.Assert(exception.InnerException != null, "InnerException must be set to be able to convert"); 121uint hresult = (uint)exception.InnerException.HResult; 122var innerSocketException = exception.InnerException as SocketException; 138if (exception.InnerException is AuthenticationException)
System.ServiceModel.NetFramingBase (6)
System\ServiceModel\Channels\Connection.cs (6)
346if (ioException.InnerException is TimeoutException) 348return new TimeoutException(ioException.InnerException.Message, ioException); 350else if (ioException.InnerException is CommunicationObjectAbortedException) 352return new CommunicationObjectAbortedException(ioException.InnerException.Message, ioException); 354else if (ioException.InnerException is CommunicationException) 356return new CommunicationException(ioException.InnerException.Message, ioException);
System.ServiceModel.Primitives (17)
Internals\System\Runtime\Diagnostics\EtwDiagnosticTrace.cs (2)
101if (exception.InnerException != null) 198WriteExceptionToTraceString(xml, exception.InnerException, remainingLength, remainingAllowedRecursionDepth);
Internals\System\Runtime\ExceptionTrace.cs (7)
111if (targetInvocationException != null && targetInvocationException.InnerException != null) 113return AsError(targetInvocationException.InnerException); 130if (targetInvocationException != null && targetInvocationException.InnerException != null) 132return AsError(targetInvocationException.InnerException, eventSource); 150Exception innerException = targetInvocationException.InnerException; 208Exception innerException = (targetInvocationException != null && targetInvocationException.InnerException != null) 209? targetInvocationException.InnerException
Internals\System\Runtime\Fx.cs (1)
200exception = exception.InnerException;
Internals\System\Runtime\TaskHelpers.cs (2)
63tcsObj.TrySetException(antecedent.Exception.InnerException); 119tcsObj.TrySetException(antecedent.Exception.InnerException);
System\ServiceModel\Channels\ServiceChannelProxy.cs (1)
407throw e.InnerException;
System\ServiceModel\Channels\WsrmMessageInfo.cs (1)
524messageInfo._faultException = exception.InnerException;
System\ServiceModel\Dispatcher\InvokerUtil.cs (1)
92Exception actualException = tie.InnerException;
System\ServiceModel\ExceptionDetail.cs (2)
29if (exception.InnerException != null) 31InnerException = new ExceptionDetail(exception.InnerException);
System.ServiceModel.Primitives.Tests (1)
Security\SecurityNegotiationExceptionTest.cs (1)
27Assert.Equal(exceptionMessage, exception3.InnerException.Message);
System.Speech (1)
Internal\SrgsParser\XmlParser.cs (1)
104ThrowSrgsExceptionWithPosition(_filename, _reader, e.Message, e.InnerException);
System.Text.RegularExpressions (1)
System\Text\RegularExpressions\RegexMatchTimeoutException.cs (1)
112/// to the <see cref="Exception.InnerException"/> property.
System.Threading.Tasks.Dataflow (4)
Internal\Common.cs (4)
260else if (exc.InnerException != null) 262StoreStringIntoExceptionData(exc.InnerException, Common.EXCEPTIONDATAKEY_DATAFLOWMESSAGEVALUE, strValue); 314Debug.Assert(!unwrapInnerExceptions || exception.InnerException != null, 329list.Add(exception.InnerException!);
System.Transactions.Local (1)
System\Transactions\Oletx\OletxResourceManager.cs (1)
113if (ex.InnerException is COMException comEx)
System.Windows.Forms (13)
System\Resources\ResXResourceReader.cs (2)
383string newMessage = string.Format(SR.InvocationException, reader[ResXResourceWriter.TypeStr], pt.Y, pt.X, tie.InnerException?.Message); 384XmlException xml = new(newMessage, tie.InnerException, pt.Y, pt.X);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.ExceptionConverter.cs (2)
22if (ex.InnerException is not null) 24ex = ex.InnerException;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (4)
4948ex = ex.InnerException; 4958ex = ex?.InnerException; 5021ex = ex.InnerException; 5031ex = ex?.InnerException;
System\Windows\Forms\Controls\TextBox\MaskedTextBox.cs (2)
2339if (exception.InnerException is not null) 2342exception = exception.InnerException;
System\Windows\Forms\Design\ComponentEditorForm.ComponentEditorPageSite.cs (1)
43throw new TargetInvocationException(string.Format(SR.ExceptionCreatingCompEditorControl, e), e.InnerException);
System\Windows\Forms\Internal\Formatter.cs (2)
485throw new FormatException(ex.InnerException?.Message, ex.InnerException);
System.Windows.Forms.Design (10)
System\ComponentModel\Design\DesignerActionPanel.MethodLine.cs (1)
68ex = ex.InnerException!;
System\ComponentModel\Design\DesignerActionPanel.PropertyLine.cs (1)
82e = e.InnerException!;
System\ComponentModel\Design\DesignerHost.cs (1)
338if (e is TargetInvocationException && e.InnerException is { } inner)
System\ComponentModel\Design\Serialization\BasicDesignerLoader.cs (1)
216e = e.InnerException!;
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (1)
453e = e.InnerException!;
System\ComponentModel\Design\Serialization\EventMemberCodeDomSerializer.cs (1)
66e = e.InnerException!;
System\ComponentModel\Design\Serialization\PropertyMemberCodeDomSerializer.cs (1)
120e = e.InnerException!;
System\Windows\Forms\Design\DocumentDesigner.AxToolboxItem.cs (1)
104throw tie.InnerException!;
System\Windows\Forms\Design\OleDragDropHandler.cs (2)
212if (ex.InnerException is not null) 214exceptionMessage = ex.InnerException.ToString();
System.Xaml (17)
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\CriticalExceptions.cs (2)
49while (ex.InnerException is not null && 53ex = ex.InnerException;
System\Xaml\InfosetObjects\XamlObjectWriter.cs (2)
1892if (!(ex.InnerException is ArgumentException) && 1893!(ex.InnerException is InvalidCastException))
System\Xaml\Runtime\ClrObjectRuntime.cs (2)
36if (e is TargetInvocationException && e.InnerException is not null) 38return e.InnerException;
System\Xaml\Runtime\PartialTrustTolerantRuntime.cs (11)
143if (ex.InnerException is MethodAccessException) 150else if (ex.InnerException is MissingMethodException) 174if (ex.InnerException is MethodAccessException) 181else if (ex.InnerException is MissingMethodException) 207if (e.InnerException is MissingMethodException) 211else if (e.InnerException is MethodAccessException) 239if (e.InnerException is MissingMethodException) 243else if (e.InnerException is MethodAccessException) 299if (e.InnerException is MethodAccessException) 346if (e.InnerException is MethodAccessException) 375if (e.InnerException is MethodAccessException)
vbc (2)
src\roslyn\src\Compilers\Shared\CompilerServerLogger.cs (2)
70Exception? e = exception.InnerException; 75e = e.InnerException;
VBCSCompiler (2)
src\roslyn\src\Compilers\Shared\CompilerServerLogger.cs (2)
70Exception? e = exception.InnerException; 75e = e.InnerException;
vstest.console (3)
CommandLine\Executor.cs (3)
431ex.InnerException != null && 432!string.Equals(ex.InnerException.Message, ex.Message, StringComparison.CurrentCultureIgnoreCase)) 434Output.Error(false, ex.InnerException.Message);
vstest.console.arm64 (3)
src\vstest\src\vstest.console\CommandLine\Executor.cs (3)
431ex.InnerException != null && 432!string.Equals(ex.InnerException.Message, ex.Message, StringComparison.CurrentCultureIgnoreCase)) 434Output.Error(false, ex.InnerException.Message);