268 references to GetType
aspire (4)
Commands\RunCommand.cs (1)
659runActivity?.SetTag(TelemetryConstants.Tags.ErrorType, ex.GetType().FullName);
Telemetry\AspireCliTelemetry.cs (1)
203[TelemetryConstants.Tags.ExceptionType] = exception.GetType().FullName,
Tui\TerminalViewerApp.cs (2)
272_logger.LogDebug(ex, "Embedded CTS teardown failed ({ExceptionType}).", ex.GetType().FullName); 290_logger.LogDebug(ex, "Embedded terminal dispose failed ({ExceptionType}).", ex.GetType().FullName);
Aspire.Acquisition.Tests (2)
Scripts\Common\RealGitHubPRFixture.cs (2)
104_testOutput.WriteLine($"Skipping PR {prNumber}: {ex.GetType().Name}: {ex.Message}"); 141_testOutput.WriteLine($"Skipping artifact query for run {successfulRun.DatabaseId}: {ex.GetType().Name}: {ex.Message}");
Aspire.Cli.Tests (1)
Configuration\ConfigurationHelperTests.cs (1)
278Assert.True(ex is null or InvalidOperationException, $"Unexpected exception type: {ex?.GetType().FullName}");
Aspire.Confluent.Kafka (1)
src\Vendoring\OpenTelemetry.Instrumentation.ConfluentKafka\OpenTelemetryConsumeResultExtensions.cs (1)
135processActivity?.SetTag(SemanticConventions.AttributeErrorType, ex.GetType().FullName);
Aspire.Dashboard (6)
Model\GenAI\GenAIVisualizerDialogViewModel.cs (2)
147sb.AppendLine(CultureInfo.InvariantCulture, $"{current.GetType().FullName}: {current.Message}"); 576Error description: {ex.GetType().FullName}: {ex.Message}
ServiceClient\TracingSqliteConnection.cs (1)
136activity?.SetTag("error.type", exception.GetType().FullName);
Telemetry\TelemetryErrorRecorder.cs (2)
36$"{exception.GetType().FullName}: {exception.Message}", 40[TelemetryPropertyKeys.ExceptionType] = new AspireTelemetryProperty(exception.GetType().FullName!),
Terminal\TerminalWebSocketProxy.cs (1)
454var exType = exception?.GetType().FullName ?? "(none)";
Aspire.Hosting (2)
Diagnostics\ProfilingTelemetry.cs (2)
820[Tags.ExceptionType] = exception?.GetType().FullName, 1012[Tags.ExceptionType] = exception.GetType().FullName,
Aspire.Hosting.Browsers (2)
BrowserConnectionDiagnosticsLogger.cs (2)
46? current.GetType().Name 47: $"{current.GetType().Name}: {current.Message}";
Aspire.Hosting.Browsers.Tests (2)
src\Aspire.Hosting.Browsers\BrowserConnectionDiagnosticsLogger.cs (2)
46? current.GetType().Name 47: $"{current.GetType().Name}: {current.Message}";
Aspire.Hosting.Radius (1)
Secrets\SealedSecretManifest.cs (1)
75$"is missing or unreadable ({ex.GetType().Name}). Diagnostic: ASPIRERADIUS044.", ex);
Aspire.Hosting.RemoteHost (6)
Ats\CapabilityDispatcher.cs (1)
602_logger.LogError(ex, "Capability {CapabilityId} failed with {ExceptionType}: {Message}", capabilityId, ex.GetType().Name, ex.Message);
Ats\PolyglotCapabilityInvocationException.cs (1)
140var message = exception.GetType().FullName == "Aspire.Hosting.DistributedApplicationException"
CodeGeneration\CodeGenerationDiagnostic.cs (2)
189OriginalExceptionType = exception.GetType().FullName ?? exception.GetType().Name,
Diagnostics\RemoteHostProfilingTelemetry.cs (1)
453[Tags.ExceptionType] = exception.GetType().FullName,
RemoteAppHostService.cs (1)
158_logger.LogError(ex, " invokeCapability({CapabilityId}) Exception: {ExceptionType} - {Message}", capabilityId, ex.GetType().Name, ex.Message);
Aspire.Hosting.Rust (1)
CargoMetadataReader.cs (1)
138$"Unable to read the output of 'cargo metadata' for the Rust app '{resourceName}'. Cargo returned invalid {ex.GetType().Name} output.");
Aspire.Hosting.TestUtilities (1)
Utils\DockerUtils.cs (1)
72$"container runtime detection failed with {exception.GetType().Name}: {exception.Message}",
Aspire.RabbitMQ.Client (1)
src\Components\Aspire.RabbitMQ.Client\AspireRabbitMQExtensions.cs (1)
269connectAttemptActivity.AddTag("exception.type", ex.GetType().FullName);
Aspire.RabbitMQ.Client.Tests (1)
AspireRabbitMQLoggingTests.cs (1)
227Assert.Equal($"{innerException.GetType()}: {innerException.Message}", errorEvent[3].Value?.ToString());
Aspire.RabbitMQ.Client.v6.Tests (1)
tests\Aspire.RabbitMQ.Client.Tests\AspireRabbitMQLoggingTests.cs (1)
227Assert.Equal($"{innerException.GetType()}: {innerException.Message}", errorEvent[3].Value?.ToString());
Client.ExpectedExceptions.IntegrationTests (3)
ExpectedExceptionTests.4.1.0.cs (3)
360string exceptionType = exception.GetType().Name; 402string exceptionType = exception.GetType().Name; 449string exceptionType = exception.GetType().Name;
Crossgen2Tasks (2)
CommonFilePulledFromSdkRepo\TaskBase.cs (2)
54{"exceptionType", e.GetType().ToString() }, 91s = e.GetType().ToString();
csc (1)
src\roslyn\src\Compilers\Shared\CompilerServerLogger.cs (1)
83builder.AppendLine($"Exception: '{exception.GetType().Name}' '{exception.Message}' occurred during '{reason}'");
dotnet (7)
Commands\Run\FileBasedAppRunPlan.cs (1)
300Reporter.Verbose.WriteLine($"Failed to deserialize cache entry ({path}): {exception.GetType().FullName}: {exception.Message}");
Commands\Test\MTP\IPC\HttpTestHostGateway.cs (1)
183Logger.LogTrace($"The dotnet test HTTP gateway rejected a malformed protocol frame of type '{ex.GetType().FullName}'.");
Parser.cs (1)
383else if (exception is not null && exception.GetType().Name.Equals("WorkloadManifestCompositionException"))
src\sdk\artifacts\.packages\microsoft.codeanalysis.buildclient\5.11.0-1.26425.101\contentFiles\cs\net11.0\CompilerServerLogger.cs (1)
83builder.AppendLine($"Exception: '{exception.GetType().Name}' '{exception.Message}' occurred during '{reason}'");
Telemetry\ExternalTelemetryProperties.cs (1)
68Debug.Assert(false, $"Unexpected exception from GetProductInfo: ${e.GetType().Name}: ${e.Message}");
Telemetry\TelemetryFilter.cs (2)
37{ "exceptionType", exception.GetType().ToString() }, 176s = e.GetType().ToString();
dotnet-aot (5)
src\sdk\src\Cli\dotnet\Commands\Run\FileBasedAppRunPlan.cs (1)
300Reporter.Verbose.WriteLine($"Failed to deserialize cache entry ({path}): {exception.GetType().FullName}: {exception.Message}");
src\sdk\src\Cli\dotnet\Parser.cs (1)
383else if (exception is not null && exception.GetType().Name.Equals("WorkloadManifestCompositionException"))
src\sdk\src\Cli\dotnet\Telemetry\ExternalTelemetryProperties.cs (1)
68Debug.Assert(false, $"Unexpected exception from GetProductInfo: ${e.GetType().Name}: ${e.Message}");
src\sdk\src\Cli\dotnet\Telemetry\TelemetryFilter.cs (2)
37{ "exceptionType", exception.GetType().ToString() }, 176s = e.GetType().ToString();
dotnet-svcutil-lib (10)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ExceptionDataContract.cs (1)
489fieldToValueDictionary.Add("_className", value.GetType().ToString());
FrameworkFork\System.ServiceModel\Internals\System\Runtime\AssertHelper.cs (1)
56newMessage = string.Concat(newMessage, " [", exception.GetType().Name, ": ", exception.Message, "] --> ", message);
FrameworkFork\System.ServiceModel\Internals\System\Runtime\Diagnostics\DiagnosticTraceBase.cs (1)
166xml.WriteElementString(DiagnosticStrings.ExceptionTypeTag, XmlEncode(exception.GetType().AssemblyQualifiedName));
FrameworkFork\System.ServiceModel\Internals\System\Runtime\Diagnostics\EtwDiagnosticTrace.cs (1)
281new Tuple<string, string> (DiagnosticStrings.ExceptionTypeTag, XmlEncode(exception.GetType().AssemblyQualifiedName)),
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\Message.cs (1)
473return string.Format(SRServiceModel.MessageBodyToStringError, e.GetType().ToString(), e.Message);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ErrorBehavior.cs (2)
186WcfEventSource.Instance.ServiceException(error.ToString(), error.GetType().FullName); 194WcfEventSource.Instance.ErrorHandlerInvoked(_handlers[i].GetType().FullName, handledByThis, error.GetType().FullName);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\FaultFormatter.cs (1)
44for (Type faultType = faultException.GetType(); faultType != typeof(FaultException); faultType = faultType.BaseType())
FrameworkFork\System.ServiceModel\System\ServiceModel\ExceptionDetail.cs (1)
30_type = exception.GetType().ToString();
FrameworkFork\System.ServiceModel\System\ServiceModel\FaultException.cs (1)
384return string.Format(SRServiceModel.SFxFaultExceptionToString3, this.GetType(), this.Message, _detail != null ? _detail.ToString() : String.Empty);
GetDocument.Insider (1)
src\ab038811704af8d7\HostFactoryResolver.cs (1)
259catch (TargetInvocationException tie) when (tie.InnerException?.GetType().Name == "HostAbortedException")
ILCompiler.Compiler (1)
src\runtime\src\coreclr\tools\Common\TypeSystem\IL\Stubs\TypeSystemThrowingILEmitter.cs (1)
25Type exceptionType = exception.GetType();
ILCompiler.RyuJit (1)
src\runtime\src\coreclr\tools\Common\TypeSystem\IL\Stubs\TypeSystemThrowingILEmitter.cs (1)
25Type exceptionType = exception.GetType();
Infrastructure.Common (1)
xunit\ConditionAttribute.cs (1)
91exc.GetType().Name,
Microsoft.AspNetCore.Authentication.Core (1)
AuthenticationMetrics.cs (1)
202tags.Add("error.type", exception.GetType().FullName);
Microsoft.AspNetCore.Authorization (1)
AuthorizationMetrics.cs (1)
61tags.Add("error.type", exception.GetType().FullName);
Microsoft.AspNetCore.Components (2)
ComponentsActivitySource.cs (1)
125activity.SetTag("error.type", ex.GetType().FullName);
ComponentsMetrics.cs (1)
208var errorType = exception?.GetType().FullName;
Microsoft.AspNetCore.Components.Server (1)
Circuits\CircuitActivitySource.cs (1)
68activity.SetTag("error.type", ex.GetType().FullName);
Microsoft.AspNetCore.Diagnostics (6)
DeveloperExceptionPage\DeveloperExceptionPageMiddlewareImpl.cs (2)
118var exceptionName = ex.GetType().FullName!; 253Title = TypeNameHelper.GetTypeDisplayName(errorContext.Exception.GetType()),
DeveloperExceptionPage\Views\ErrorPage.Designer.cs (2)
351Write(errorDetail.Error!.GetType().Name); 567Write(errorDetail.Error!.GetType().Name);
DiagnosticsTelemetry.cs (1)
20tagsFeature.TryAddTag("error.type", ex.GetType().FullName);
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (1)
115var exceptionName = edi.SourceException.GetType().FullName!;
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (2)
DatabaseErrorPageMiddleware.cs (1)
124_logger.AttemptingToMatchException(exception.GetType());
Views\DatabaseErrorPage.Designer.cs (1)
160Write(ex.GetType().Name);
Microsoft.AspNetCore.Grpc.JsonTranscoding (2)
Internal\CommonGrpcProtocolHelpers.cs (2)
14return ex.InnerException == null ? $"{ex.GetType().Name}: {ex.Message}" : BuildErrorMessage(ex); 33sb.Append(current.GetType().Name);
Microsoft.AspNetCore.Hosting (4)
Internal\HostingApplicationDiagnostics.cs (1)
543activity.SetTag(HostingTelemetryHelpers.AttributeErrorType, exception.GetType().FullName);
Internal\HostingMetrics.cs (1)
89tags.TryAddTag(HostingTelemetryHelpers.AttributeErrorType, exception.GetType().FullName);
src\aspnetcore\src\Shared\ErrorPage\ErrorPage.Designer.cs (2)
299Write(errorDetail.Error!.GetType().Name); 467Write(errorDetail.Error!.GetType().Name);
Microsoft.AspNetCore.Identity (1)
SignInManagerMetrics.cs (1)
198tags.Add("error.type", exception.GetType().FullName!);
Microsoft.AspNetCore.Mvc.Testing (1)
src\ab038811704af8d7\HostFactoryResolver.cs (1)
259catch (TargetInvocationException tie) when (tie.InnerException?.GetType().Name == "HostAbortedException")
Microsoft.AspNetCore.Server.IIS (2)
src\aspnetcore\src\Shared\ErrorPage\ErrorPage.Designer.cs (2)
299Write(errorDetail.Error!.GetType().Name); 467Write(errorDetail.Error!.GetType().Name);
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Internal\Infrastructure\KestrelMetrics.cs (2)
150tags.TryAddTag(ErrorTypeAttributeName, exception.GetType().FullName); 341tags.TryAddTag(ErrorTypeAttributeName, exception.GetType().FullName);
Microsoft.AspNetCore.SignalR.Client.Core (4)
HubConnection.cs (2)
1323activity.SetTag("error.type", ex.GetType().FullName); 1565activity.SetTag("error.type", ex.GetType().FullName);
Internal\InvocationRequest.cs (2)
135Activity.SetTag("error.type", exception.GetType().FullName); 210Activity.SetTag("error.type", exception.GetType().FullName);
Microsoft.AspNetCore.SignalR.Core (2)
Internal\DefaultHubDispatcher.cs (1)
1017activity?.SetTag("error.type", ex.GetType().FullName);
Internal\ErrorMessageHelper.cs (1)
12return $"{message} {exception.GetType().Name}: {exception.Message}";
Microsoft.AspNetCore.TestHost (1)
src\ab038811704af8d7\HostFactoryResolver.cs (1)
259catch (TargetInvocationException tie) when (tie.InnerException?.GetType().Name == "HostAbortedException")
Microsoft.Build (4)
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (1)
1453TraceEngine($"EL: EXCEPTION caught in engine: {e.GetType()} - {e.Message}");
BackEnd\Components\RequestBuilder\TaskBuilder.cs (1)
871var type = taskException.GetType();
Logging\BinaryLogger\BuildEventArgsReader.cs (1)
250_recordNumber, localSerializedEventLength, localException.GetType(), localException.Message) + (_skipUnknownEvents
src\msbuild\src\Shared\TaskLoggingHelper.cs (1)
1660builder.Append(currentException.GetType().Name);
Microsoft.Build.Framework (6)
BuildException\BuildExceptionBase.cs (1)
81string serializationType = BuildExceptionSerializationHelper.GetExceptionSerializationKey(exception.GetType());
Telemetry\BuildCheckTelemetry.cs (1)
28string? exceptionType = exception.GetType().FullName;
Telemetry\CrashTelemetry.cs (3)
400ExceptionType = exception.GetType().FullName; 401InnerExceptionType = exception.InnerException?.GetType().FullName; 402InnermostExceptionType = GetInnermostException(exception)?.GetType().FullName;
Telemetry\CrashTelemetryRecorder.cs (1)
190: base(CrashTelemetry.TruncateMessage(original.Message) ?? original.GetType().FullName,
Microsoft.Build.Tasks.CodeAnalysis (1)
src\roslyn\src\Compilers\Shared\CompilerServerLogger.cs (1)
83builder.AppendLine($"Exception: '{exception.GetType().Name}' '{exception.Message}' occurred during '{reason}'");
Microsoft.Build.Tasks.Core (2)
GenerateResource.cs (1)
3601(e is SystemException && e.GetType().Name == "ConfigurationErrorsException") // TODO: catch specific exception type once it is public https://github.com/dotnet/corefx/issues/40456
WriteCodeFragment.cs (1)
173(e.GetType().Name == "ConfigurationErrorsException") // TODO: catch specific exception type once it is public https://github.com/dotnet/corefx/issues/40456
Microsoft.Build.Utilities.Core (1)
src\msbuild\src\Shared\TaskLoggingHelper.cs (1)
1660builder.Append(currentException.GetType().Name);
Microsoft.CodeAnalysis (6)
DiagnosticAnalyzer\AnalyzerExecutor.cs (3)
1442var messageArguments = new[] { analyzerName, e.GetType().ToString(), e.Message, contextInformation }; 1474return string.Format(CodeAnalysisResources.CompilerAnalyzerThrows, analyzerName, ex.GetType().ToString(), ex.Message, ex.CreateDiagnosticDescription()); 1489var messageArguments = new[] { e.GetType().ToString(), e.Message, e.CreateDiagnosticDescription() };
InternalUtilities\XmlUtilities.cs (1)
85catch (Exception e) when (e.GetType().FullName == "System.Xml.XPath.XPathException")
RuleSet\RuleSet.cs (1)
322if (e is FileNotFoundException || e.GetType().Name == "DirectoryNotFoundException")
SourceGeneration\GeneratorDriver.cs (1)
620return Diagnostic.Create(descriptor, Location.None, generator.GetGeneratorType().Name, e.GetType().Name, e.Message, e.CreateDiagnosticDescription());
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\StackGuard.cs (1)
27return ex.GetType().Name == "InsufficientExecutionStackException";
Microsoft.CodeAnalysis.Features (1)
Diagnostics\Service\DocumentAnalysisExecutor_Helpers.cs (1)
44return Diagnostic.Create(descriptor, Location.None, analyzerName, e.GetType(), e.Message);
Microsoft.CodeAnalysis.NetAnalyzers (1)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\StackGuard.cs (1)
26return ex.GetType().Name == "InsufficientExecutionStackException";
Microsoft.CodeAnalysis.Scripting (2)
Hosting\ObjectFormatter\CommonObjectFormatter.cs (1)
71builder.Append(e.GetType());
Hosting\ObjectFormatter\CommonObjectFormatter.Visitor.cs (1)
516result.Append(_formatter.TypeNameFormatter.FormatTypeName(exception.GetType(), _typeNameOptions));
Microsoft.CodeAnalysis.Workspaces (2)
Storage\StorageDatabaseLogger.cs (2)
35if (_set.Count > 10 || !_set.TryAdd(ex.GetType(), ex)) 43m[Kind] = ex.GetType().ToString();
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
Rpc\RpcServer.cs (1)
186response = new Response { Id = request.Id, ExceptionMessage = $"An exception of type {e.GetType()} was thrown: {e.Message}", ExceptionStackTrace = e.StackTrace };
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\ComInterop\ExcepInfo.cs (1)
78Type exceptionType = exception.GetType();
Microsoft.Diagnostics.DataContractReader.Contracts (1)
Contracts\StackWalk\StackWalk_1.cs (1)
370Debug.WriteLine($"Exception during WalkStackReferences at IP=0x{gcFrame.Frame.Context.InstructionPointer:X}: {ex.GetType().Name}: {ex.Message}");
Microsoft.Diagnostics.DataContractReader.Legacy (1)
Dbi\DacDbiImpl.cs (1)
1775sb.Append($" | (decode failed: {ex.GetType().Name}: {ex.Message})");
Microsoft.DotNet.ApiCompat.Task (2)
src\sdk\src\Tasks\Common\TaskBase.cs (2)
54{"exceptionType", e.GetType().ToString() }, 91s = e.GetType().ToString();
Microsoft.DotNet.Cli.Telemetry (1)
Implementation\AzureMonitorLogSerializer.cs (1)
180TypeName = BreezeSchema.Truncate(exception.GetType().FullName, BreezeSchema.ExceptionTypeNameMaxLength),
Microsoft.Extensions.AI (9)
ChatCompletion\OpenTelemetryChatClient.cs (1)
411tags.Add(OpenTelemetryConsts.Error.Type, error.GetType().FullName);
ChatCompletion\OpenTelemetryImageGenerator.cs (1)
221tags.Add(OpenTelemetryConsts.Error.Type, error.GetType().FullName);
Common\FunctionInvocationProcessor.cs (1)
210_ = activity.SetTag(OpenTelemetryConsts.Error.Type, e.GetType().FullName)
Common\OpenTelemetryLog.cs (1)
29.AddTag(OpenTelemetryConsts.Error.Type, error.GetType().FullName)
Embeddings\OpenTelemetryEmbeddingGenerator.cs (1)
207tags.Add(OpenTelemetryConsts.Error.Type, error.GetType().FullName);
Files\OpenTelemetryHostedFileClient.cs (1)
455tags.Add(OpenTelemetryConsts.Error.Type, error.GetType().FullName);
Realtime\OpenTelemetryRealtimeClientSession.cs (1)
753tags.Add(OpenTelemetryConsts.Error.Type, error.GetType().FullName);
SpeechToText\OpenTelemetrySpeechToTextClient.cs (1)
255tags.Add(OpenTelemetryConsts.Error.Type, error.GetType().FullName);
TextToSpeech\OpenTelemetryTextToSpeechClient.cs (1)
254tags.Add(OpenTelemetryConsts.Error.Type, error.GetType().FullName);
Microsoft.Extensions.AI.Abstractions (1)
Contents\FunctionResultContent.cs (1)
68$"{Exception.GetType().Name}(\"{Exception.Message}\")" :
Microsoft.Extensions.AI.OpenAI.Tests (2)
OpenAIRealtimeClientSessionTests.cs (1)
94$"Expected OperationCanceledException or WebSocketException but got {ex.GetType().FullName}");
OpenAIRealtimeClientTests.cs (1)
61$"Expected OperationCanceledException or WebSocketException but got {ex.GetType().FullName}");
Microsoft.Extensions.AI.Tests (5)
ChatCompletion\OpenTelemetryChatClientTests.cs (1)
1052Assert.Equal(expectedException.GetType().FullName, activity.GetTagItem("error.type"));
Embeddings\OpenTelemetryEmbeddingGeneratorTests.cs (1)
132Assert.Equal(expectedException.GetType().FullName, activity.GetTagItem("error.type"));
Image\OpenTelemetryImageGeneratorTests.cs (1)
205Assert.Equal(expectedException.GetType().FullName, activity.GetTagItem("error.type"));
SpeechToText\OpenTelemetrySpeechToTextClientTests.cs (1)
203Assert.Equal(expectedException.GetType().FullName, activity.GetTagItem("error.type"));
TextToSpeech\OpenTelemetryTextToSpeechClientTests.cs (1)
183Assert.Equal(expectedException.GetType().FullName, activity.GetTagItem("error.type"));
Microsoft.Extensions.DataIngestion (1)
IngestionPipeline.cs (1)
124activity?.SetTag(ErrorTypeTagName, ex.GetType().FullName)
Microsoft.Extensions.Diagnostics.ExceptionSummarization (3)
ExceptionSummarizer.cs (3)
35var exceptionType = exception.GetType(); 53var innerExceptionType = exception.InnerException.GetType(); 66? exception.InnerException.GetType().Name
Microsoft.Extensions.FileProviders.Physical (2)
PhysicalFilesWatcher.cs (2)
447if (a.GetType() != b.GetType())
Microsoft.Extensions.Identity.Core (1)
UserManagerMetrics.cs (1)
230var value = exception?.GetType().FullName ?? result?.Errors.FirstOrDefault()?.Code;
Microsoft.Extensions.Logging.EventSource (1)
ExceptionInfo.cs (1)
22TypeName = exception.GetType().FullName;
Microsoft.Extensions.Telemetry (2)
Logging\ExtendedLogger.cs (2)
142tags.Add(ExceptionType, exception.GetType().ToString()); 191_ = sb.Append(exception.GetType());
Microsoft.Extensions.VectorData.ConformanceTests (1)
FilterTests.cs (1)
139Assert.Fail($"Expected {nameof(InvalidOperationException)} or {nameof(VectorStoreException)} but got {exception.GetType()}");
Microsoft.Gen.Logging.Generated.Tests (2)
LogMethodTests.cs (2)
601Assert.Equal(exception.GetType(), collector.LatestRecord.Exception!.GetType());
Microsoft.Gen.MetadataExtractor (1)
MetricDefinitionEmitter.cs (1)
143throw new InvalidOperationException($"An exception occurred during metric report generation {e.GetType()}:{e.Message}.");
Microsoft.Gen.MetricsReports (1)
MetricDefinitionEmitter.cs (1)
143throw new InvalidOperationException($"An exception occurred during metric report generation {e.GetType()}:{e.Message}.");
Microsoft.ML.AutoML.Tests (2)
AutoFitTests.cs (1)
684$"Obtained unexpected error of type {lastException.GetType()} with message: {lastException.Message}");
MetricsAgentsTests.cs (1)
164Assert.Equal(typeof(NotSupportedException), ex.GetType());
Microsoft.ML.Maml (2)
MAML.cs (2)
248writer.WriteLine("({0}) Unexpected exception: {1}, '{2}'", index, e.Message, e.GetType()); 266ch.Error(e.Sensitivity(), "({0}) Unexpected exception: {1}, '{2}'", index, e.Message, e.GetType());
Microsoft.NET.Build.Extensions.Tasks (2)
src\sdk\src\Tasks\Common\TaskBase.cs (2)
54{"exceptionType", e.GetType().ToString() }, 91s = e.GetType().ToString();
Microsoft.NET.Build.Tasks (2)
src\sdk\src\Tasks\Common\TaskBase.cs (2)
54{"exceptionType", e.GetType().ToString() }, 91s = e.GetType().ToString();
Microsoft.NET.Sdk.Publish.Tasks (4)
MsDeploy\CommonUtility.cs (2)
1552Type t = e.GetType(); 1565if (IsType(rootException.GetType(), MSWebDelegationAssembly.DynamicAssembly?.GetType(MSDeploy.TypeName.DeploymentException)))
Tasks\MsDeploy\VsMsdeploy.cs (1)
870Type eType = e.GetType();
Tasks\Xdt\TaskTransformationLogger.cs (1)
162sb.AppendFormat("{0} : {1}", exIterator.GetType().Name, exIterator.Message);
Microsoft.TestPlatform.CommunicationUtilities (1)
Serialization\ExceptionConverter.cs (1)
78: value.GetType().FullName);
Microsoft.TestPlatform.CoreUtilities (2)
Tracing\EqtTrace.cs (2)
740exceptionToTrace.GetType(), 770inner.GetType(),
Microsoft.VisualBasic.Core (1)
Microsoft\VisualBasic\ErrObject.vb (1)
370Dim typ As Type = e.GetType()
Microsoft.VisualStudio.TestPlatform.Common (2)
DataCollection\TestPlatformDataCollectionLogger.cs (2)
79exception.GetType(), 88exception.GetType(),
Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger (2)
Utility\Converter.cs (2)
217e.GetType().ToString(), 410e.GetType().ToString(),
NuGet.Credentials (1)
PluginException.cs (1)
64string.Format(CultureInfo.CurrentCulture, Resources.PluginException_Exception_Format, path, inner.GetType().Name),
NuGet.PackageManagement (1)
Resolution\ResolverGather.cs (1)
664string message = String.Format(CultureInfo.CurrentCulture, Strings.ExceptionWhenTryingToAddSource, ex.GetType().ToString(), currentSource);
NuGet.Protocol (1)
Utility\OfflineFeedUtility.cs (1)
229&& (ex.GetType().FullName?.Equals("SharpCompress.Common.ArchiveException", StringComparison.Ordinal) == true
PresentationBuildTasks (1)
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (1)
1379!typeof(System.Xml.XmlException).IsAssignableFrom(innerException.GetType()))
PresentationCore (2)
MS\Internal\FontFace\CompositeFontParser.cs (1)
192catch (Exception x) when(string.Equals(x.GetType().FullName, "System.Security.XmlSyntaxException", StringComparison.OrdinalIgnoreCase))
MS\Internal\TextFormatting\FullTextLine.cs (1)
403Type t = caughtException.GetType();
PresentationFramework (9)
MS\Internal\Printing\Win32PrintDialog.cs (1)
105if (String.Equals(e.GetType().FullName, "System.Printing.PrintingNotSupportedException", StringComparison.Ordinal))
MS\Internal\TraceData.cs (1)
292return $"{ex.GetType().Name} ({AvTrace.AntiFormat(ex.Message)})";
MS\Internal\WindowsRuntime\Generated\WinRT\ExceptionHelpers.cs (2)
182message = ex.GetType().FullName; 355ex.GetType().GetProperty("HResult").SetValue(ex, value);
MS\Internal\WindowsRuntime\Generated\WinRT\Interop\ExceptionErrorInfo.cs (1)
63desc = _exception.GetType().FullName;
System\Windows\Controls\DataErrorValidationRule.cs (1)
92ex.GetType().FullName,
System\Windows\Documents\MsSpellCheckLib\Utils\RetryHelper.cs (1)
286Type exceptionType = exception.GetType();
System\Windows\Standard\ErrorCodes.cs (2)
425if (e.GetType() == typeof(COMException)) 439ConstructorInfo cons = e.GetType().GetConstructor(new[] { typeof(string) });
Security.TransportSecurity.IntegrationTests (4)
Https\HttpsTests.4.1.1.cs (1)
110Assert.True(communicationException.GetType().Name == "SecurityNegotiationException",
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"))
Tcp\ClientCredentialTypeTests.4.1.1.cs (1)
109Assert.True(communicationException.GetType().Name == "SecurityNegotiationException",
SelectTests (1)
Program.cs (1)
508sb.AppendLine(CultureInfo.InvariantCulture, $"- error: {ex.GetType().Name}: {ex.Message}");
System.ComponentModel.Composition (2)
System\ComponentModel\Composition\MetadataViewProvider.cs (2)
100if (ex.InnerException!.GetType() == typeof(InvalidCastException)) 111else if (ex.InnerException.GetType() == typeof(NullReferenceException))
System.ComponentModel.TypeConverter (1)
System\ComponentModel\ReflectPropertyDescriptor.cs (1)
938string message = t.Message ?? t.GetType().Name;
System.Configuration.ConfigurationManager (1)
System\Configuration\ConfigurationErrorsException.cs (1)
223info.AddValue(numPrefix + SerializationParamErrorType, _errors[i].GetType());
System.Data.Common (8)
src\runtime\src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (2)
241Type type = e.GetType(); 261Type type = e.GetType();
System\Data\DataSetUtil.cs (6)
91return ((e.GetType() != typeof(StackOverflowException)) && 92(e.GetType() != typeof(OutOfMemoryException)) && 93(e.GetType() != typeof(System.Threading.ThreadAbortException)) && 94(e.GetType() != typeof(NullReferenceException)) && 95(e.GetType() != typeof(System.Security.SecurityException)) && 96!typeof(System.Security.SecurityException).IsAssignableFrom(e.GetType()));
System.Data.Odbc (2)
src\runtime\src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (2)
241Type type = e.GetType(); 261Type type = e.GetType();
System.Data.OleDb (2)
System\Data\Common\AdapterUtil.cs (2)
224Type type = e.GetType(); 244Type type = e.GetType();
System.Diagnostics.DiagnosticSource (2)
System\Diagnostics\Activity.cs (1)
606exceptionTags.Add(new KeyValuePair<string, object?>(ExceptionTypeTag, exception.GetType().ToString()));
System\Diagnostics\Metrics\RuntimeMetrics.cs (1)
139s_exceptions.Add(1, new KeyValuePair<string, object?>("error.type", e.Exception.GetType().Name));
System.DirectoryServices.AccountManagement (5)
System\DirectoryServices\AccountManagement\AuthZSet.cs (1)
192GlobalDebug.WriteLineIf(GlobalDebug.Error, "AuthZSet", "Caught exception {0} with message {1}", e.GetType(), e.Message);
System\DirectoryServices\AccountManagement\Context.cs (3)
656+ e.GetType().ToString() + 758+ e.GetType().ToString() + 913+ e.GetType().ToString() +
System\DirectoryServices\AccountManagement\Utils.cs (1)
162+ e.GetType().ToString() +
System.Net.Http (1)
System\Net\Http\DiagnosticsHelper.cs (1)
91_ => exception.GetType().FullName!
System.Net.NameResolution (1)
System\Net\NameResolutionTelemetry.cs (1)
152_ => exception.GetType().FullName!
System.Net.Security (1)
System\Net\Security\NetSecurityTelemetry.cs (1)
348activity.SetTag("error.type", exception.GetType().FullName);
System.Net.WebSockets (1)
System\Net\WebSockets\NetEventSource.WebSockets.cs (1)
84=> Trace(obj, $"{exception.GetType().Name}: {exception.Message}", memberName);
System.Private.CoreLib (13)
src\runtime\src\libraries\System.Private.CoreLib\src\System\AggregateException.cs (1)
335return new AggregateException(GetType() == typeof(AggregateException) ? base.Message : Message, flattenedExceptions.ToArray(), cloneExceptions: false);
src\runtime\src\libraries\System.Private.CoreLib\src\System\BadImageFormatException.cs (1)
98string s = GetType().ToString() + ": " + Message;
src\runtime\src\libraries\System.Private.CoreLib\src\System\ComponentModel\Win32Exception.cs (1)
93string className = GetType().ToString();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (1)
2457ReportOutOfBandMessage(errorPrefix + ": " + innerEx.GetType() + ":" + innerEx.Message);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Exception.cs (1)
65private string GetClassName() => GetType().ToString();
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\DirectoryNotFoundException.cs (1)
56string s = GetType().ToString() + ": " + Message;
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\FileLoadException.cs (1)
53string s = GetType().ToString() + ": " + Message;
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\FileNotFoundException.cs (1)
76string s = GetType().ToString() + ": " + Message;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\COMException.cs (1)
54s.Append($"{GetType()} (0x{HResult:X8})");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ExternalException.cs (1)
54string s = $"{GetType()} (0x{HResult:X8})";
System\CrashInfo.cs (1)
184if (!WriteStringValue("type"u8, exception.GetType().ToString()))
System\Exception.NativeAot.cs (1)
133string typeName = !fatalOutOfMemory ? ex.GetType().ToString() : "System.OutOfMemoryException";
System\RuntimeExceptionHelpers.cs (1)
299Internal.Console.Error.Write(exception.GetMethodTable() == Internal.Runtime.MethodTable.Of<OutOfMemoryException>() ? "Out of memory." : exception.GetType().FullName);
System.Private.Xml (1)
System\Xml\Xsl\XslException.cs (1)
83string result = this.GetType().FullName!;
System.ServiceModel.Federation.Tests (2)
WSTrustChannelFactoryTest.cs (1)
21Assert.Equal(typeof(ArgumentNullException), ex.GetType());
WSTrustChannelTest.cs (1)
21Assert.Equal(typeof(ArgumentNullException), ex.GetType());
System.ServiceModel.Primitives (7)
Internals\System\Runtime\Diagnostics\EtwDiagnosticTrace.cs (1)
77new Tuple<string, string> (DiagnosticStrings.ExceptionTypeTag, XmlEncode(exception.GetType().AssemblyQualifiedName)),
System\ServiceModel\Channels\Message.cs (1)
542return SRP.Format(SRP.MessageBodyToStringError, e.GetType().ToString(), e.Message);
System\ServiceModel\Dispatcher\ErrorBehavior.cs (2)
192WcfEventSource.Instance.ServiceException(error.ToString(), error.GetType().FullName); 200WcfEventSource.Instance.ErrorHandlerInvoked(_handlers[i].GetType().FullName, handledByThis, error.GetType().FullName);
System\ServiceModel\Dispatcher\FaultFormatter.cs (1)
51for (Type faultType = faultException.GetType(); faultType != typeof(FaultException); faultType = faultType.BaseType())
System\ServiceModel\ExceptionDetail.cs (1)
27_type = exception.GetType().ToString();
System\ServiceModel\FaultException.cs (1)
425return SRP.Format(SRP.SFxFaultExceptionToString3, GetType(), Message, Detail != null ? Detail.ToString() : string.Empty);
System.Windows.Forms (9)
System\Windows\Forms\ActiveX\AxHost.AxPerPropertyBrowsingEnum.cs (1)
122Debug.Fail($"Failed to build IPerPropertyBrowsing editor. {ex.GetType().Name}, {ex.Message}");
System\Windows\Forms\ComponentModel\COM2Interop\Com2IPerPropertyBrowsingHandler.Com2IPerPropertyBrowsingEnum.cs (1)
152Debug.Fail($"Failed to build IPerPropertyBrowsing editor. {ex.GetType().Name}, {ex.Message}");
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (2)
1400Debug.Fail($"Failed to get properties: {e.GetType().Name},{e.Message}\n{e.StackTrace}"); 1444Debug.Fail($"Bad Type Converter! {t.GetType().Name}, {t.Message},{converter}", t.ToString());
System\Windows\Forms\Controls\TextBox\MaskedTextBox.cs (1)
2345message = $"{exception.GetType()}: {exception.Message}";
System\Windows\Forms\Dialogs\ThreadExceptionDialog.cs (2)
150messageText = t.GetType().Name; 155messageText = string.Format(messageFormat, t.GetType().Name, Trim(messageText));
System\Windows\Forms\Rendering\Animation\AnimationManager.cs (2)
158ex.GetType().FullName ?? ex.GetType().Name);
System.Windows.Forms.Design (1)
System\ComponentModel\Design\Serialization\ResourceCodeDomSerializer.SerializationResourceManager.cs (1)
258message = e.GetType().Name;
System.Windows.Forms.Primitives (4)
System\Windows\Forms\Animation\HighPrecisionTimer.cs (4)
239ex.GetType().FullName ?? ex.GetType().Name); 506exception.GetType().FullName ?? exception.GetType().Name);
vbc (1)
src\roslyn\src\Compilers\Shared\CompilerServerLogger.cs (1)
83builder.AppendLine($"Exception: '{exception.GetType().Name}' '{exception.Message}' occurred during '{reason}'");
VBCSCompiler (1)
src\roslyn\src\Compilers\Shared\CompilerServerLogger.cs (1)
83builder.AppendLine($"Exception: '{exception.GetType().Name}' '{exception.Message}' occurred during '{reason}'");