307 types derived from Exception
Aspire.EndToEnd.Tests (1)
Aspire.Hosting (1)
Aspire.Workload.Tests (1)
BasicWebSite (1)
ClientSample (1)
Crossgen2Tasks (1)
dotnet-dev-certs (2)
dotnet-getdocument (2)
dotnet-openapi (1)
dotnet-sql-cache (1)
dotnet-svcutil-lib (24)
dotnet-user-jwts (1)
dotnet-user-secrets (1)
GetDocument.Insider (3)
http2cat (5)
IIS.FunctionalTests (5)
IIS.LongTests (5)
IIS.NewHandler.FunctionalTests (5)
IIS.NewShim.FunctionalTests (5)
IIS.ShadowCopy.Tests (2)
IISExpress.FunctionalTests (5)
illink (2)
Microsoft.Analyzers.Local (1)
Microsoft.AspNetCore.Antiforgery (1)
Microsoft.AspNetCore.Authentication.Abstractions (1)
Microsoft.AspNetCore.Components (4)
Microsoft.AspNetCore.Components.Endpoints (1)
Microsoft.AspNetCore.Components.Server (1)
Microsoft.AspNetCore.DeveloperCertificates.XPlat (1)
Microsoft.AspNetCore.Diagnostics.Tests (1)
Microsoft.AspNetCore.Http.Connections.Client (2)
Microsoft.AspNetCore.Http.Extensions (1)
Microsoft.AspNetCore.Identity (1)
Microsoft.AspNetCore.JsonPatch (1)
Microsoft.AspNetCore.Mvc.Abstractions (3)
Microsoft.AspNetCore.Mvc.Abstractions.Test (1)
Microsoft.AspNetCore.Mvc.Core (1)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
Microsoft.AspNetCore.Mvc.Testing (1)
Microsoft.AspNetCore.OutputCaching.Tests (1)
Microsoft.AspNetCore.Routing (3)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (5)
Microsoft.AspNetCore.Server.Kestrel.Core (12)
Microsoft.AspNetCore.Shared.Tests (8)
Microsoft.AspNetCore.SignalR.Common (1)
Microsoft.AspNetCore.TestHost (2)
Microsoft.Build (1)
Microsoft.Build.Framework (1)
Microsoft.Build.Tasks.Core (9)
Microsoft.CodeAnalysis (9)
Microsoft.CodeAnalysis.CSharp (4)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (2)
Microsoft.CodeAnalysis.Scripting (1)
Microsoft.CodeAnalysis.Scripting.TestUtilities (1)
Microsoft.CodeAnalysis.Test.Utilities (3)
Microsoft.CodeAnalysis.Workspaces (2)
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
Microsoft.CSharp (4)
Microsoft.DotNet.Helix.Client (1)
Microsoft.DotNet.RemoteExecutor (2)
Microsoft.DotNet.VersionTools (2)
Microsoft.DotNet.XliffTasks (1)
Microsoft.DotNet.XUnitExtensions (3)
Microsoft.Extensions.Caching.Hybrid.Tests (1)
Microsoft.Extensions.Hosting.Abstractions (1)
Microsoft.Extensions.Options (1)
Microsoft.Gen.MetadataExtractor (1)
Microsoft.Gen.Metrics (1)
Microsoft.Gen.MetricsReports (1)
Microsoft.Interop.ComInterfaceGenerator (1)
Microsoft.Interop.JavaScript.JSImportGenerator (1)
Microsoft.Interop.LibraryImportGenerator (1)
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
Microsoft.Interop.SourceGeneration (2)
Microsoft.JSInterop (2)
Microsoft.Maui (2)
Microsoft.Maui.Controls (4)
Microsoft.Maui.Controls.Build.Tasks (1)
Microsoft.Maui.Controls.SourceGen (1)
Microsoft.ML.AutoML (1)
Microsoft.ML.FastTree (1)
Microsoft.ML.StandardTrainers (1)
Microsoft.TestUtilities (1)
Microsoft.VisualBasic.Core (2)
Microsoft.VisualStudio.LanguageServices (1)
Microsoft.VisualStudio.LanguageServices.LiveShare (1)
MSBuild (2)
MSBuildTaskHost (1)
PresentationBuildTasks (2)
PresentationCore (1)
PresentationFramework (4)
PresentationUI (1)
ReachFramework (1)
Swaggatherer (1)
System.ComponentModel.Annotations (1)
System.ComponentModel.Composition (4)
System.Composition.Runtime (1)
System.Configuration.ConfigurationManager (4)
System.Diagnostics.EventLog (1)
System.DirectoryServices (4)
System.DirectoryServices.Protocols (1)
System.Formats.Asn1 (1)
System.Formats.Cbor (1)
System.IO.IsolatedStorage (1)
System.Linq (1)
System.Linq.Expressions (1)
System.Net.Http (7)
System.Net.Mail (2)
System.Net.NameResolution (1)
System.Net.Requests (1)
System.Net.Security (3)
System.Net.Sockets (1)
System.Private.CoreLib (13)
System.Private.Windows.Core (1)
System.Private.Xml (2)
System.Reflection.Metadata (2)
System.Runtime.InteropServices.JavaScript (1)
System.Runtime.Serialization.Primitives (1)
System.ServiceModel.Primitives (4)
System.Text.Json (1)
System.Threading (1)
System.Windows.Forms (1)
System.Windows.Forms.Design (1)
System.Xaml (2)
Templates.Blazor.Tests (2)
Templates.Blazor.WebAssembly.Auth.Tests (2)
Templates.Blazor.WebAssembly.Tests (2)
Templates.Mvc.Tests (2)
Templates.Tests (2)
UIAutomationTypes (2)
Wasm.Performance.ConsoleHost (1)
XmlFileLogger (1)
xunit.assert (2)
xunit.console (1)
1117 instantiations of Exception
BasicWebSite (3)
BuildBoss (4)
BuildValidator (3)
ClassLibraryWithPortablePdbs (2)
Client.ExpectedExceptions.IntegrationTests (1)
Contract.Fault.IntegrationTests (1)
csc (1)
DefaultBuilder.SampleApp (1)
DeveloperExceptionPageSample (1)
Diagnostics.EFCore.FunctionalTests (10)
dotnet-svcutil-lib (23)
ErrorCustomCheck (3)
ExceptionHandlerSample (2)
GenerateRulesMissingDocumentation (1)
http2cat (5)
HttpStress (7)
IdeBenchmarks (2)
IdeCoreBenchmarks (1)
IIS.FunctionalTests (6)
IIS.LongTests (6)
IIS.NewHandler.FunctionalTests (6)
IIS.NewShim.FunctionalTests (6)
IIS.ShadowCopy.Tests (1)
IISExpress.FunctionalTests (6)
InMemory.FunctionalTests (35)
InProcessWebSite (2)
InteractiveHost.UnitTests (2)
Interop.FunctionalTests (7)
Microsoft.Arcade.Common (1)
Microsoft.Arcade.Test.Common (1)
Microsoft.AspNetCore.Antiforgery.Test (1)
Microsoft.AspNetCore.App.Analyzers.Test (9)
Microsoft.AspNetCore.Authentication.Negotiate.Test (6)
Microsoft.AspNetCore.Authentication.Test (9)
Microsoft.AspNetCore.Components.Tests (8)
Microsoft.AspNetCore.Components.WebView.Test (8)
Microsoft.AspNetCore.ConcurrencyLimiter.Tests (1)
Microsoft.AspNetCore.Cors.Test (2)
Microsoft.AspNetCore.DataProtection.Extensions.Tests (1)
Microsoft.AspNetCore.DataProtection.Tests (3)
Microsoft.AspNetCore.Diagnostics.Tests (18)
Microsoft.AspNetCore.FunctionalTests (1)
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (4)
Microsoft.AspNetCore.Hosting.Tests (8)
Microsoft.AspNetCore.Http.Abstractions.Microbenchmarks (4)
Microsoft.AspNetCore.Http.Abstractions.Tests (1)
Microsoft.AspNetCore.Http.Connections.Tests (5)
Microsoft.AspNetCore.Http.Results.Tests (1)
Microsoft.AspNetCore.Http.Tests (1)
Microsoft.AspNetCore.Identity.Test (5)
Microsoft.AspNetCore.InternalTesting (1)
Microsoft.AspNetCore.InternalTesting.Tests (6)
Microsoft.AspNetCore.MiddlewareAnalysis.Tests (1)
Microsoft.AspNetCore.Mvc.Abstractions.Test (12)
ModelBinding\ModelStateDictionaryTest.cs (12)
325var exception = new Exception();
649var ex = new Exception();
761dictionary.AddModelError("key2", new Exception(), metadata);
762dictionary.AddModelError("key3", new Exception(), metadata);
791result = dictionary.TryAddModelException("key2", new Exception());
794result = dictionary.TryAddModelException("key3", new Exception());
824result = dictionary.TryAddModelError("key2", new Exception(), metadata);
861dictionary.AddModelError("key1", new Exception(), metadata);
864dictionary.AddModelError("key3", new Exception(), metadata);
896result = dictionary.TryAddModelError("key2", new Exception(), metadata);
899result = dictionary.TryAddModelError("key3", new Exception(), metadata);
922dictionary.TryAddModelError("key3", new Exception(), metadata);
Microsoft.AspNetCore.Mvc.Core.Test (2)
Microsoft.AspNetCore.Mvc.FunctionalTests (2)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (4)
Microsoft.AspNetCore.Mvc.Razor.Test (2)
Microsoft.AspNetCore.Mvc.RazorPages.Test (3)
Microsoft.AspNetCore.Mvc.TagHelpers.Test (6)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (10)
Microsoft.AspNetCore.Razor.Runtime.Test (2)
Microsoft.AspNetCore.Routing.Tests (6)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (16)
Microsoft.AspNetCore.Server.IntegrationTesting (7)
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (5)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (20)
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (5)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (7)
Microsoft.AspNetCore.Shared.Tests (10)
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (2)
Microsoft.AspNetCore.SignalR.Client.Tests (23)
Microsoft.AspNetCore.SignalR.Microbenchmarks (12)
Microsoft.AspNetCore.SignalR.Specification.Tests (2)
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (2)
Microsoft.AspNetCore.SignalR.Tests (6)
Microsoft.AspNetCore.SignalR.Tests.Utils (2)
Microsoft.AspNetCore.TestHost.Tests (1)
Microsoft.AspNetCore.WebSockets.ConformanceTests (1)
Microsoft.Build (2)
Microsoft.Build.BuildCheck.UnitTests (3)
Microsoft.Build.CommandLine.UnitTests (1)
Microsoft.Build.Engine.OM.UnitTests (2)
Microsoft.Build.Engine.UnitTests (33)
BackEnd\EventSourceSink_Tests.cs (7)
173throw new Exception();
193Exception[] exceptionArray = new Exception[] { new IndexOutOfRangeException(), new Exception() }; //// two non-critical exceptions
204Exception[] exceptionArray1 = new Exception[] { new IndexOutOfRangeException(), new Exception() }; //// two non-critical exceptions
207Exception[] exceptionArray2 = new Exception[] { ae1, new Exception() }; //// two non-critical exceptions (ae1 contains nested exceptions)
228Exception[] exceptionArray = new Exception[] { new OutOfMemoryException(), new IndexOutOfRangeException(), new Exception() }; //// two non-critical exceptions, one critical
239Exception[] exceptionArray1 = new Exception[] { new OutOfMemoryException(), new IndexOutOfRangeException(), new Exception() }; //// two non-critical exceptions, one critical
242Exception[] exceptionArray2 = new Exception[] { ae1, new Exception() }; //// one critical one non-critical (ae1 contains nested critical exception)
BackEnd\LoggingServicesLogMethod_Tests.cs (9)
217service.LogFatalError(null, new Exception("SuperException"), new BuildEventFileInfo("foo.cs"), "FatalTaskError", "TaskName");
230service.LogFatalError(s_buildEventContext, new Exception("SuperException"), null, "FatalTaskError", "TaskName");
262service.LogFatalError(s_buildEventContext, new Exception("SuperException"), fileInfo, null);
276service.LogFatalError(s_buildEventContext, new Exception("SuperException"), fileInfo, string.Empty, null);
287Exception exception = new Exception("SuperException");
311Exception exception = new Exception("SuperException");
336service.LogFatalTaskError(s_buildEventContext, new Exception("SuperException"), fileInfo, null);
347Exception exception = new Exception("SuperException");
553Exception exception = new Exception("SuperException");
Microsoft.Build.Tasks.CodeAnalysis (2)
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (5)
Microsoft.Build.Tasks.Core (1)
Microsoft.Build.Tasks.UnitTests (7)
Microsoft.Build.Utilities.UnitTests (1)
Microsoft.CodeAnalysis.CSharp (1)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (9)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (5)
Microsoft.CodeAnalysis.CSharp.EndToEnd.UnitTests (6)
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (13)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (10)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (4)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
Microsoft.CodeAnalysis.EditorFeatures (1)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (9)
Microsoft.CodeAnalysis.EditorFeatures.Wpf (2)
Microsoft.CodeAnalysis.ExternalAccess.FSharp (1)
Microsoft.CodeAnalysis.Features (2)
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
Microsoft.CodeAnalysis.LanguageServer.Protocol (3)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (2)
Microsoft.CodeAnalysis.LanguageServer.UnitTests (2)
Microsoft.CodeAnalysis.Rebuild (2)
Microsoft.CodeAnalysis.Scripting.TestUtilities (4)
Microsoft.CodeAnalysis.Test.Utilities (16)
Microsoft.CodeAnalysis.UnitTests (8)
Microsoft.CodeAnalysis.Workspaces (2)
Microsoft.CodeAnalysis.Workspaces.MSBuild (8)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (3)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
Microsoft.CodeAnalysis.Workspaces.UnitTests (6)
Microsoft.CommonLanguageServerProtocol.Framework.Package (1)
Microsoft.Data.Analysis (13)
Microsoft.Data.Analysis.Tests (13)
Microsoft.DotNet.Build.Tasks.Feed (9)
Microsoft.DotNet.Build.Tasks.Workloads (17)
Microsoft.DotNet.Deployment.Tasks.Links (1)
Microsoft.DotNet.GenFacades (1)
Microsoft.DotNet.Git.IssueManager (1)
Microsoft.DotNet.Helix.Sdk (3)
Microsoft.DotNet.MacOsPkg (17)
Microsoft.DotNet.NuGetRepack.Tests (1)
Microsoft.DotNet.SignTool (6)
Microsoft.DotNet.VersionTools (2)
Microsoft.DotNet.VersionTools.Tasks (2)
Microsoft.DotNet.XliffTasks (1)
Microsoft.Extensions.AI.Abstractions.Tests (2)
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (4)
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (4)
Microsoft.JSInterop.Tests (1)
Microsoft.Maui (6)
Microsoft.Maui.Controls (14)
Microsoft.Maui.Controls.Build.Tasks (1)
Microsoft.Maui.Controls.SourceGen (3)
Microsoft.Maui.Controls.Xaml (1)
Microsoft.Maui.Graphics (2)
Microsoft.Maui.Graphics.Win2D.WinUI.Desktop (3)
Microsoft.ML.AutoML (5)
Microsoft.ML.CodeGenerator (16)
Microsoft.ML.EntryPoints (1)
Microsoft.ML.Fairlearn (2)
Microsoft.ML.FastTree (1)
Microsoft.ML.GenAI.Core (3)
Microsoft.ML.PerformanceTests (7)
Microsoft.ML.Sweeper (1)
Microsoft.ML.Tokenizers.Data.Tests (1)
Microsoft.ML.Tokenizers.Tests (1)
Microsoft.ML.TorchSharp (1)
Microsoft.Svcutil.NamedPipeMetadataImporter (1)
Microsoft.VisualBasic.Core (10)
Microsoft\VisualBasic\CompilerServices\IncompleteInitialization.vb (1)
10MyBase.New()
Microsoft.VisualStudio.IntegrationTest.Setup (1)
Microsoft.VisualStudio.LanguageServices (15)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
MiddlewareAnalysisSample (1)
Mvc.RoutingWebSite (2)
PresentationBuildTasks (2)
PresentationCore (8)
PresentationFramework (112)
ProjectCachePlugin (1)
RazorPagesWebSite (4)
Replay (4)
Roslyn.Compilers.Extension (1)
Roslyn.Test.PdbUtilities (8)
Reader\Token2SourceLineExporter.cs (8)
889throw new Exception(
1205throw new Exception("No `name' stream");
1257throw new Exception("Unsupported PDB deleted bitset is not empty.");
1279throw new Exception(string.Format("Count mismatch. ({0} != {1})", j, cnt));
1294throw new Exception(string.Format("Invalid signature. (sig={0})", sig));
1342throw new Exception(string.Format("OEM section: guid={0} ti={1}", oem.idOem, oem.typind));
1416throw new Exception(string.Format("Unsupported Name Stream version. (sig={0:x8}, ver={1})", sig, ver));
1461throw new Exception(string.Format("Error reading DBI stream, pos={0} != {1}", bits.Position, end));
Roslyn.Test.Performance.Utilities (4)
RunTests (4)
ScenarioTests.Common.Tests (2)
Security.TransportSecurity.IntegrationTests (4)
ServerComparison.FunctionalTests (1)
Shared.Tests (2)
Sockets.BindTests (3)
Sockets.FunctionalTests (11)
StackDepthTest (1)
System.ComponentModel.Composition (56)
System.ComponentModel.Composition.Registration (4)
System.Composition.Convention (4)
System.Composition.Hosting (4)
System.Formats.Cbor (6)
System.IO.Ports (1)
System.Linq.Queryable (1)
System.Private.CoreLib.Generators (1)
System.Private.DataContractSerialization (4)
System.Private.Xml (3)
System.Reflection.MetadataLoadContext (1)
System.Runtime.Serialization.Schema (1)
System.ServiceModel.Federation (1)
System.ServiceModel.NetFramingBase (2)
System.ServiceModel.Primitives.Tests (1)
System.Text.Json (2)
System.Text.Json.SourceGeneration (1)
System.Threading.Channels (1)
System.Threading.Tasks.Parallel (1)
UIAutomationTypes (1)
vbc (1)
VBCSCompiler (3)
VBCSCompiler.UnitTests (19)
WindowsBase.Tests (15)
12791 references to Exception
AnalyzerRunner (1)
Aspire.Azure.Data.Tables.Tests (1)
Aspire.Azure.Messaging.EventHubs (1)
Aspire.Azure.Messaging.ServiceBus.Tests (2)
Aspire.Azure.Messaging.WebPubSub (1)
Aspire.Azure.Search.Documents (1)
Aspire.Azure.Security.KeyVault.Tests (1)
Aspire.Azure.Storage.Blobs.Tests (1)
Aspire.Azure.Storage.Queues.Tests (1)
Aspire.Components.Common.Tests (2)
Aspire.Confluent.Kafka (1)
src\Vendoring\OpenTelemetry.Instrumentation.ConfluentKafka\OpenTelemetryConsumeResultExtensions.cs (1)
132catch (Exception ex)
Aspire.Dashboard (21)
Aspire.Dashboard.Components.Tests (9)
Aspire.Dashboard.Tests (11)
Aspire.Elastic.Clients.Elasticsearch (1)
Aspire.EndToEnd.Tests (3)
Aspire.Hosting (46)
ApplicationModel\ResourceLoggerService.cs (4)
116public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
540public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Aspire.Hosting.Azure (5)
Aspire.Hosting.Azure.ServiceBus (1)
Aspire.Hosting.Dapr (1)
Aspire.Hosting.Elasticsearch (1)
Aspire.Hosting.Nats (1)
Aspire.Hosting.Qdrant (1)
Aspire.Hosting.Redis (1)
Aspire.Hosting.Testing (13)
Aspire.Hosting.Testing.Tests (10)
Aspire.Hosting.Tests (15)
Aspire.Microsoft.Data.SqlClient (16)
Aspire.Microsoft.EntityFrameworkCore.Cosmos.Tests (1)
Aspire.Microsoft.EntityFrameworkCore.SqlServer (16)
Aspire.Microsoft.EntityFrameworkCore.SqlServer.Tests (1)
Aspire.Milvus.Client (1)
Aspire.NATS.Net (1)
Aspire.Npgsql.EntityFrameworkCore.PostgreSQL.Tests (1)
Aspire.Oracle.EntityFrameworkCore.Tests (2)
Aspire.Playground.Tests (10)
Aspire.Pomelo.EntityFrameworkCore.MySql.Tests (1)
Aspire.Qdrant.Client (1)
Aspire.RabbitMQ.Client (6)
Aspire.RabbitMQ.Client.Tests (7)
Aspire.RabbitMQ.Client.v7.Tests (8)
tests\Aspire.RabbitMQ.Client.Tests\AspireRabbitMQLoggingTests.cs (8)
118Exception testException;
123catch (Exception ex)
163Exception testException;
169catch (Exception ex)
222private static void LogError(string message, Exception ex)
227s_log.GetType().GetMethod("Error", [typeof(string), typeof(Exception)])!.Invoke(s_log, new object[] { message, ex });
248public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Aspire.Workload.Tests (4)
AzureSearch.ApiService (1)
BasicTestApp (2)
Binding.Tcp.IntegrationTests (2)
BuildBoss (6)
BuildValidator (6)
DemoLogger.cs (4)
42public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
73public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Client.ClientBase.IntegrationTests (9)
SessionTests.cs (8)
200catch (Exception e)
311ResultsVerificationHelper<Exception>(canMakeServiceCall: true, cbClosedCalled: false, cbClosingCalled: false, cbFaultedCalled: false);
333ResultsVerificationHelper<Exception>(canMakeServiceCall: true, cbClosedCalled: false, cbClosingCalled: false, cbFaultedCalled: false);
406ResultsVerificationHelper<Exception>(canMakeServiceCall: true, cbClosedCalled: false, cbClosingCalled: false, cbFaultedCalled: false);
429ResultsVerificationHelper<Exception>(canMakeServiceCall: true, cbClosedCalled: false, cbClosingCalled: false, cbFaultedCalled: false);
472catch (Exception e)
537where ExpectedException : Exception
553catch (Exception e)
Client.ExpectedExceptions.IntegrationTests (9)
ClientSample (8)
CodeStyleConfigFileGenerator (3)
Contract.Service.IntegrationTests (12)
Contract.XmlSerializer.IntegrationTests (10)
Crossgen2Tasks (5)
csc (17)
CSharpSyntaxGenerator (1)
csi (1)
DatabaseMigration.MigrationService (1)
DependencyInjectionApp (1)
DesignSurface (2)
DesignSurfaceExt (7)
Diagnostics.EFCore.FunctionalTests (6)
dotnet-dev-certs (29)
dotnet-getdocument (2)
dotnet-openapi (5)
dotnet-sql-cache (4)
dotnet-svcutil.xmlserializer (20)
dotnet-svcutil.xmlserializer.IntegrationTests (10)
dotnet-svcutil-lib (948)
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextReaderImpl.cs (9)
2700internal void DtdParserProxy_Throw(Exception e)
2767private void Throw(string res, string arg, Exception innerException)
2772private void Throw(string res, string[] args, Exception innerException)
2777private void Throw(Exception e)
2788private void ReThrow(Exception e, int lineNo, int linePos)
2790Throw(new XmlException(e.Message, (Exception)null, lineNo, linePos, _ps.baseUriStr));
2803private void ThrowWithoutLineInfo(string res, string[] args, Exception innerException)
8049catch (Exception)
8065catch (Exception e)
FrameworkFork\Microsoft.Xml\Xml\schema\DatatypeImplementation.cs (74)
550Exception exception = TryParseValue(s, nameTable, nsmgr, out typedValue);
568Exception exception = TryParseValue(s, nameTable, nsmgr, out typedValue);
581internal override Exception TryParseValue(object value, XmlNameTable nameTable, IXmlNamespaceResolver namespaceResolver, out object typedValue)
583Exception exception = null;
1047internal override Exception TryParseValue(object value, XmlNameTable nameTable, IXmlNamespaceResolver namespaceResolver, out object typedValue)
1049Exception exception;
1125internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
1127Exception exception;
1267internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
1269Exception exception;
1303internal override Exception TryParseValue(object value, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
1305Exception exception;
1402internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
1483internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
1485Exception exception;
1557internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
1559Exception exception;
1642internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
1644Exception exception;
1731internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
1733Exception exception;
1825internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
1827Exception exception;
1916internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
1918Exception exception;
1947internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
1949Exception exception;
1985internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
1987Exception exception;
2077internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
2079Exception exception;
2462internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
2464Exception exception;
2563internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
2565Exception exception;
2670internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
2672Exception exception;
2756internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
2758Exception exception;
2956internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
2958Exception exception;
3092internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
3094Exception exception;
3172internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
3174Exception exception;
3290internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
3292Exception exception;
3346internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
3348Exception exception;
3403internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
3405Exception exception;
3459internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
3461Exception exception;
3547internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
3549Exception exception;
3603internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
3605Exception exception;
3659internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
3661Exception exception;
3714internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
3716Exception exception;
3771catch (Exception e)
3792catch (Exception e)
3830catch (Exception e)
3873catch (Exception e)
3879internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
3881Exception exception;
3902Exception exception;
3917catch (Exception e)
3925internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
3927Exception exception;
3974catch (Exception e)
3980internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
3982Exception exception;
FrameworkFork\Microsoft.Xml\Xml\schema\FacetChecker.cs (43)
368catch (Exception e)
669Exception ex = datatype.TryParseValue(facet.Value, nameTable, nsmgr, out typedValue);
781internal virtual Exception CheckLexicalFacets(ref string parseString, XmlSchemaDatatype datatype)
786internal virtual Exception CheckValueFacets(object value, XmlSchemaDatatype datatype)
790internal virtual Exception CheckValueFacets(decimal value, XmlSchemaDatatype datatype)
794internal virtual Exception CheckValueFacets(Int64 value, XmlSchemaDatatype datatype)
798internal virtual Exception CheckValueFacets(Int32 value, XmlSchemaDatatype datatype)
802internal virtual Exception CheckValueFacets(Int16 value, XmlSchemaDatatype datatype)
806internal virtual Exception CheckValueFacets(byte value, XmlSchemaDatatype datatype)
810internal virtual Exception CheckValueFacets(DateTime value, XmlSchemaDatatype datatype)
814internal virtual Exception CheckValueFacets(double value, XmlSchemaDatatype datatype)
818internal virtual Exception CheckValueFacets(float value, XmlSchemaDatatype datatype)
822internal virtual Exception CheckValueFacets(string value, XmlSchemaDatatype datatype)
826internal virtual Exception CheckValueFacets(byte[] value, XmlSchemaDatatype datatype)
830internal virtual Exception CheckValueFacets(TimeSpan value, XmlSchemaDatatype datatype)
834internal virtual Exception CheckValueFacets(XmlQualifiedName value, XmlSchemaDatatype datatype)
876internal Exception CheckPatternFacets(RestrictionFacets restriction, string value)
1005internal override Exception CheckValueFacets(object value, XmlSchemaDatatype datatype)
1011internal override Exception CheckValueFacets(decimal value, XmlSchemaDatatype datatype)
1068internal override Exception CheckValueFacets(Int64 value, XmlSchemaDatatype datatype)
1074internal override Exception CheckValueFacets(Int32 value, XmlSchemaDatatype datatype)
1079internal override Exception CheckValueFacets(Int16 value, XmlSchemaDatatype datatype)
1084internal override Exception CheckValueFacets(byte value, XmlSchemaDatatype datatype)
1105internal Exception CheckTotalAndFractionDigits(decimal value, int totalDigits, int fractionDigits, bool checkTotal, bool checkFraction)
1134internal override Exception CheckValueFacets(object value, XmlSchemaDatatype datatype)
1140internal override Exception CheckValueFacets(double value, XmlSchemaDatatype datatype)
1186internal override Exception CheckValueFacets(float value, XmlSchemaDatatype datatype)
1210internal override Exception CheckValueFacets(object value, XmlSchemaDatatype datatype)
1216internal override Exception CheckValueFacets(TimeSpan value, XmlSchemaDatatype datatype)
1281internal override Exception CheckValueFacets(object value, XmlSchemaDatatype datatype)
1287internal override Exception CheckValueFacets(DateTime value, XmlSchemaDatatype datatype)
1368internal override Exception CheckValueFacets(object value, XmlSchemaDatatype datatype)
1374internal override Exception CheckValueFacets(string value, XmlSchemaDatatype datatype)
1379internal Exception CheckValueFacets(string value, XmlSchemaDatatype datatype, bool verifyUri)
1385Exception exception;
1454private Exception CheckBuiltInFacets(string s, XmlTypeCode typeCode, bool verifyUri)
1456Exception exception = null;
1510internal override Exception CheckValueFacets(object value, XmlSchemaDatatype datatype)
1516internal override Exception CheckValueFacets(XmlQualifiedName value, XmlSchemaDatatype datatype)
1579internal override Exception CheckValueFacets(object value, XmlSchemaDatatype datatype)
1585internal override Exception CheckValueFacets(byte[] value, XmlSchemaDatatype datatype)
1644internal override Exception CheckValueFacets(object value, XmlSchemaDatatype datatype)
1705internal override Exception CheckValueFacets(object value, XmlSchemaDatatype datatype)
FrameworkFork\Microsoft.Xml\Xml\schema\Inference\XmlSchemaInferenceException.cs (3)
23public XmlSchemaInferenceException(String message) : base(message, ((Exception)null), 0, 0)
27public XmlSchemaInferenceException(String message, Exception innerException) : base(message, innerException, 0, 0)
32public XmlSchemaInferenceException(String message, Exception innerException, int lineNumber, int linePosition) :
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaException.cs (4)
38public XmlSchemaException(String message) : this(message, ((Exception)null), 0, 0)
46public XmlSchemaException(String message, Exception innerException) : this(message, innerException, 0, 0)
51public XmlSchemaException(String message, Exception innerException, int lineNumber, int linePosition) :
88internal XmlSchemaException(string res, string[] args, Exception innerException, string sourceUri, int lineNumber, int linePosition, XmlSchemaObject source) :
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaValidationException.cs (4)
26public XmlSchemaValidationException(String message) : base(message, ((Exception)null), 0, 0)
31public XmlSchemaValidationException(String message, Exception innerException) : base(message, innerException, 0, 0)
36public XmlSchemaValidationException(String message, Exception innerException, int lineNumber, int linePosition) :
64internal XmlSchemaValidationException(string res, string[] args, Exception innerException, string sourceUri, int lineNumber, int linePosition) :
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaValidator.cs (9)
1304Exception exception = s_dtStringArray.TryParseValue(xsiSchemaLocation, _nameTable, _nsResolver, out typedValue);
1455Exception exception = currentElementDecl.Datatype.TryParseValue(currentElementDecl.DefaultValueRaw, _nameTable, _nsResolver, out typedVal);
1497Exception exception = dtype.TryParseValue(parsedValue, _nameTable, _nsResolver, out typedValue);
1664Exception exception = s_dtQName.TryParseValue(xsiType, _nameTable, _nsResolver, out typedVal);
1880catch (Exception e)
1961Exception exception = null;
1998Exception exception = dtype.TryParseValue(stringValue, _nameTable, _nsResolver, out typedValue);
2832private void SendValidationEvent(string code, string[] args, Exception innerException, XmlSeverityType severity)
2840private void SendValidationEvent(string code, string[] args, Exception innerException)
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationReader.cs (13)
1053catch (Exception e)
1122catch (Exception e)
1363protected Exception CreateUnknownTypeException(XmlQualifiedName type)
1369protected Exception CreateReadOnlyCollectionException(string name)
1375protected Exception CreateAbstractTypeException(string name, string ns)
1381protected Exception CreateInaccessibleConstructorException(string typeName)
1387protected Exception CreateCtorHasSecurityException(string typeName)
1393protected Exception CreateUnknownNodeException()
1399protected Exception CreateUnknownConstantException(string value, Type enumType)
1405protected Exception CreateInvalidCastException(Type type, object value)
1411protected Exception CreateInvalidCastException(Type type, object value, string id)
1422protected Exception CreateBadDerivationException(string xsdDerived, string nsDerived, string xsdBase, string nsBase, string clrDerived, string clrBase)
1428protected Exception CreateMissingIXmlSerializableType(string name, string ns, string clrType)
FrameworkFork\Microsoft.Xml\Xml\XmlConvert.cs (44)
377internal static Exception TryVerifyName(string name)
446internal static Exception TryVerifyNCName(string name)
475internal static Exception TryVerifyTOKEN(string token)
518internal static Exception TryVerifyNMTOKEN(string name)
542internal static Exception TryVerifyNormalizedString(string str)
905internal static Exception TryToBoolean(string s, out Boolean result)
939internal static Exception TryToChar(string s, out Char result)
957internal static Exception TryToDecimal(string s, out Decimal result)
971internal static Exception TryToInteger(string s, out Decimal result)
989internal static Exception TryToSByte(string s, out SByte result)
1007internal static Exception TryToInt16(string s, out Int16 result)
1025internal static Exception TryToInt32(string s, out Int32 result)
1043internal static Exception TryToInt64(string s, out Int64 result)
1061internal static Exception TryToByte(string s, out Byte result)
1080internal static Exception TryToUInt16(string s, out UInt16 result)
1100internal static Exception TryToUInt32(string s, out UInt32 result)
1119internal static Exception TryToUInt64(string s, out UInt64 result)
1145internal static Exception TryToSingle(string s, out Single result)
1186internal static Exception TryToDouble(string s, out double result)
1288catch (Exception)
1299internal static Exception TryToTimeSpan(string s, out TimeSpan result)
1302Exception exception;
1464internal static Exception TryToGuid(string s, out Guid result)
1466Exception exception = null;
1535internal static Exception TryToUri(string s, out Uri result)
1758internal static Exception CreateException(string res, ExceptionType exceptionType)
1763internal static Exception CreateException(string res, ExceptionType exceptionType, int lineNo, int linePos)
1775internal static Exception CreateException(string res, string arg, ExceptionType exceptionType)
1780internal static Exception CreateException(string res, string arg, ExceptionType exceptionType, int lineNo, int linePos)
1792internal static Exception CreateException(string res, string[] args, ExceptionType exceptionType)
1797internal static Exception CreateException(string res, string[] args, ExceptionType exceptionType, int lineNo, int linePos)
1809internal static Exception CreateInvalidSurrogatePairException(char low, char hi)
1814internal static Exception CreateInvalidSurrogatePairException(char low, char hi, ExceptionType exceptionType)
1819internal static Exception CreateInvalidSurrogatePairException(char low, char hi, ExceptionType exceptionType, int lineNo, int linePos)
1828internal static Exception CreateInvalidHighSurrogateCharException(char hi)
1833internal static Exception CreateInvalidHighSurrogateCharException(char hi, ExceptionType exceptionType)
1838internal static Exception CreateInvalidHighSurrogateCharException(char hi, ExceptionType exceptionType, int lineNo, int linePos)
1843internal static Exception CreateInvalidCharException(char[] data, int length, int invCharPos)
1848internal static Exception CreateInvalidCharException(char[] data, int length, int invCharPos, ExceptionType exceptionType)
1853internal static Exception CreateInvalidCharException(string data, int invCharPos)
1858internal static Exception CreateInvalidCharException(string data, int invCharPos, ExceptionType exceptionType)
1863internal static Exception CreateInvalidCharException(char invChar, char nextChar)
1868internal static Exception CreateInvalidCharException(char invChar, char nextChar, ExceptionType exceptionType)
1873internal static Exception CreateInvalidNameCharException(string name, int index, ExceptionType exceptionType)
FrameworkFork\Microsoft.Xml\Xml\XmlException.cs (8)
38public XmlException(String message) : this(message, ((Exception)null), 0, 0)
46public XmlException(String message, Exception innerException) : this(message, innerException, 0, 0)
51public XmlException(String message, Exception innerException, int lineNumber, int linePosition) :
56internal XmlException(String message, Exception innerException, int lineNumber, int linePosition, string sourceUri) :
87internal XmlException(string res, String arg, Exception innerException, IXmlLineInfo lineInfo) :
124internal XmlException(string res, string[] args, Exception innerException, int lineNumber, int linePosition) :
128internal XmlException(string res, string[] args, Exception innerException, int lineNumber, int linePosition, string sourceUri) :
265internal static bool IsCatchableException(Exception e)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContractSet.cs (1)
508catch (Exception ex)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DictionaryGlobals.cs (1)
131catch (Exception ex)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\SchemaImporter.cs (1)
64catch (Exception ex)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\Diagnostics\EtwDiagnosticTrace.cs (6)
170public TracePayload GetSerializedPayload(object source, TraceRecord traceRecord, Exception exception)
175public TracePayload GetSerializedPayload(object source, TraceRecord traceRecord, Exception exception, bool getServiceReference)
242internal static string ExceptionToTraceString(Exception exception, int maxTraceStringLength)
265private static void WriteExceptionToTraceString(XmlWriter xml, Exception exception, int remainingLength, int remainingAllowedRecursionDepth)
320private static string GetInnerException(Exception exception, int remainingLength, int remainingAllowedRecursionDepth)
354private static string GetExceptionData(Exception exception)
FrameworkFork\System.ServiceModel\Internals\TraceCore.Designer.cs (10)
75internal static void HandledException(EtwDiagnosticTrace trace, string param0, System.Exception exception)
111internal static void ThrowingException(EtwDiagnosticTrace trace, string param0, string param1, System.Exception exception)
134internal static void UnhandledException(EtwDiagnosticTrace trace, string param0, System.Exception exception)
262internal static void HandledExceptionWarning(EtwDiagnosticTrace trace, string param0, System.Exception exception)
370internal static void HandledExceptionError(EtwDiagnosticTrace trace, string param0, System.Exception exception)
393internal static void HandledExceptionVerbose(EtwDiagnosticTrace trace, string param0, System.Exception exception)
416internal static void EtwUnhandledException(EtwDiagnosticTrace trace, string param0, System.Exception exception)
440internal static void ThrowingEtwException(EtwDiagnosticTrace trace, string param0, string param1, System.Exception exception)
464internal static void ThrowingEtwExceptionVerbose(EtwDiagnosticTrace trace, string param0, string param1, System.Exception exception)
488internal static void ThrowingExceptionVerbose(EtwDiagnosticTrace trace, string param0, string param1, System.Exception exception)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ChannelRequirements.cs (5)
224public static Exception CantCreateListenerException(IEnumerable<Type> supportedChannels, IEnumerable<Type> requiredChannels, string bindingName)
229Exception exception = ChannelRequirements.BindingContractMismatchException(supportedChannels, requiredChannels, bindingName,
242public static Exception CantCreateChannelException(IEnumerable<Type> supportedChannels, IEnumerable<Type> requiredChannels, string bindingName)
247Exception exception = ChannelRequirements.BindingContractMismatchException(supportedChannels, requiredChannels, bindingName,
259public static Exception BindingContractMismatchException(IEnumerable<Type> supportedChannels, IEnumerable<Type> requiredChannels,
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ClientWebSocketTransportDuplexSessionChannel.cs (1)
217catch (Exception e)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\FaultConverter.cs (10)
16protected abstract bool OnTryCreateException(Message message, MessageFault fault, out Exception exception);
17protected abstract bool OnTryCreateFaultMessage(Exception exception, out Message message);
19public bool TryCreateException(Message message, MessageFault fault, out Exception exception)
37Exception error = new InvalidOperationException(text);
46Exception error = new InvalidOperationException(text, exception);
54public bool TryCreateFaultMessage(Exception exception, out Message message)
63Exception error = new InvalidOperationException(text);
72Exception error = new InvalidOperationException(text);
89protected override bool OnTryCreateException(Message message, MessageFault fault, out Exception exception)
197protected override bool OnTryCreateFaultMessage(Exception exception, out Message message)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SocketConnection.cs (13)
32protected Exception _asyncReadException;
38protected Exception _asyncWriteException;
170protected Exception ConvertSendException(SocketException socketException, TimeSpan remainingTime)
176protected Exception ConvertReceiveException(SocketException socketException, TimeSpan remainingTime)
182internal static Exception ConvertTransferException(SocketException socketException, TimeSpan timeout, Exception originalException)
188protected Exception ConvertObjectDisposedException(ObjectDisposedException originalException, TransferOperation transferOperation)
204private static Exception ConvertTransferException(SocketException socketException, TimeSpan timeout, Exception originalException,
259private static Exception ConvertTimeoutErrorException(Exception originalException,
435public static Exception ConvertConnectException(SocketException socketException, Uri remoteUri, TimeSpan timeSpent, Exception innerException)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceReflector.cs (1)
474catch (Exception e)
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ChannelHandler.cs (23)
305catch (Exception e)
498private void ProvideFault(Exception e, ref ErrorHandlerFaultInfo faultInfo)
511internal bool HandleError(Exception e)
517private bool HandleError(Exception e, ref ErrorHandlerFaultInfo faultInfo)
538private bool HandleError(Exception e, RequestContext request, ServiceChannel channel)
554private bool HandleErrorContinuation(Exception e, RequestContext request, ServiceChannel channel, ref ErrorHandlerFaultInfo faultInfo, bool replied)
562catch (Exception e1)
586catch (Exception e2)
598catch (Exception e3)
621catch (Exception e4)
769Exception exception = null;
774catch (Exception e)
876private void ProvideFaultAndReplyFailure(RequestContext request, Exception exception, ref ErrorHandlerFaultInfo faultInfo, out bool replied, out bool replySentAsync)
886catch (Exception e)
947catch (Exception e)
983catch (Exception e)
1032catch (Exception e)
1046catch (Exception e)
1060catch (Exception e)
1085catch (Exception e)
1167catch (Exception e)
1202catch (Exception e)
1293public Exception Exception;
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ConcurrencyBehavior.cs (1)
197catch (Exception e)
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\InstanceBehavior.cs (1)
40catch (Exception e)
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WSSecurityPolicy11.cs (1)
89catch (Exception e)
dotnet-user-jwts (2)
dotnet-user-secrets (2)
ExceptionHandlerSample (1)
Extensibility.MessageInterceptor.IntegrationTests (12)
GetDocument.Insider (11)
HelixTestRunner (8)
HotAddSample (1)
http2cat (7)
HttpStress (2)
IIS.FunctionalTests (18)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\EventLogHelpers.cs (1)
26catch (Exception)
IIS.LongTests (13)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\EventLogHelpers.cs (1)
26catch (Exception)
IIS.NewHandler.FunctionalTests (13)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\EventLogHelpers.cs (1)
26catch (Exception)
IIS.NewShim.FunctionalTests (13)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\EventLogHelpers.cs (1)
26catch (Exception)
IIS.ShadowCopy.Tests (8)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\EventLogHelpers.cs (1)
26catch (Exception)
IIS.Tests (21)
IISExpress.FunctionalTests (17)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\EventLogHelpers.cs (1)
26catch (Exception)
illink (10)
ILLink.Tasks (1)
Infrastructure.Common (5)
InMemory.FunctionalTests (139)
HttpsTests.cs (11)
94var ex = await Assert.ThrowsAnyAsync<Exception>(() =>
103var errorException = Assert.Single(loggerProvider.ErrorLogger.ErrorExceptions);
287catch (Exception ex)
697await Assert.ThrowsAnyAsync<Exception>(() =>
824public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
848public List<Exception> ErrorExceptions { get; } = new List<Exception>();
852public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
InProcessWebSite (7)
InteractiveHost32 (1)
InteractiveHost64 (1)
Interop.FunctionalTests (30)
InteropClient (4)
InteropTests (2)
JwtClientSample (1)
Microsoft.Analyzers.Extra.Tests (1)
Microsoft.Analyzers.Local (1)
Microsoft.Analyzers.Local.Tests (2)
Microsoft.Arcade.Test.Common (2)
Microsoft.AspNetCore.Antiforgery (9)
Microsoft.AspNetCore.App.Analyzers.Test (3)
Microsoft.AspNetCore.AsyncState (2)
Microsoft.AspNetCore.Authentication (9)
Microsoft.AspNetCore.Authentication.Abstractions (4)
Microsoft.AspNetCore.Authentication.Certificate (3)
Microsoft.AspNetCore.Authentication.Core (21)
AuthenticationMetrics.cs (11)
53public void AuthenticatedRequestCompleted(string? scheme, AuthenticateResult? result, Exception? exception, long startTimestamp, long currentTimestamp)
62private void AuthenticatedRequestCompletedCore(string? scheme, AuthenticateResult? result, Exception? exception, long startTimestamp, long currentTimestamp)
91public void ChallengeCompleted(string? scheme, Exception? exception)
100private void ChallengeCompletedCore(string? scheme, Exception? exception)
117public void ForbidCompleted(string? scheme, Exception? exception)
126private void ForbidCompletedCore(string? scheme, Exception? exception)
143public void SignInCompleted(string? scheme, Exception? exception)
152private void SignInCompletedCore(string? scheme, Exception? exception)
169public void SignOutCompleted(string? scheme, Exception? exception)
178private void SignOutCompletedCore(string? scheme, Exception? exception)
200private static void AddErrorTag(ref TagList tags, Exception exception)
Microsoft.AspNetCore.Authentication.JwtBearer (16)
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (2)
Microsoft.AspNetCore.Authentication.Negotiate (9)
Microsoft.AspNetCore.Authentication.Negotiate.Test (9)
Microsoft.AspNetCore.Authentication.OAuth (5)
Microsoft.AspNetCore.Authentication.OpenIdConnect (7)
Microsoft.AspNetCore.Authentication.Test (36)
Microsoft.AspNetCore.Authentication.WsFederation (11)
Microsoft.AspNetCore.Authorization (4)
Microsoft.AspNetCore.Authorization.Test (10)
DefaultAuthorizationServiceTests.cs (10)
1160private readonly Action<LogLevel, EventId, object, Exception, Func<object, Exception, string>> _assertion;
1162public DefaultAuthorizationServiceTestLogger(Action<LogLevel, EventId, object, Exception, Func<object, Exception, string>> assertion)
1177public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
1188static void Assertion(LogLevel level, EventId eventId, object state, Exception exception, Func<object, Exception, string> formatter)
1221static void Assertion(LogLevel level, EventId eventId, object state, Exception exception, Func<object, Exception, string> formatter)
Microsoft.AspNetCore.Components (54)
Microsoft.AspNetCore.Components.Analyzers.Tests (2)
Microsoft.AspNetCore.Components.Authorization.Tests (5)
Microsoft.AspNetCore.Components.Endpoints (14)
DependencyInjection\DefaultRazorComponentsServiceOptionsConfiguration.cs (1)
64catch (Exception)
Microsoft.AspNetCore.Components.Endpoints.Tests (5)
Microsoft.AspNetCore.Components.Forms.Tests (5)
Microsoft.AspNetCore.Components.Performance (1)
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (2)
Microsoft.AspNetCore.Components.Server (116)
Circuits\CircuitHost.cs (50)
161catch (Exception ex)
221catch (Exception ex)
236List<Exception> exceptions = null;
245catch (Exception ex)
248exceptions ??= new List<Exception>();
265List<Exception> exceptions = null;
274catch (Exception ex)
277exceptions ??= new List<Exception>();
294List<Exception> exceptions = null;
303catch (Exception ex)
306exceptions ??= new List<Exception>();
321List<Exception> exceptions = null;
330catch (Exception ex)
333exceptions ??= new List<Exception>();
356catch (Exception e)
382catch (Exception ex)
416catch (Exception ex)
441catch (Exception ex)
465catch (Exception ex)
485catch (Exception ex)
515catch (Exception ex)
560catch (Exception ex)
585catch (Exception ex)
669private async void ReportAndInvoke_UnhandledException(object sender, Exception e)
679await ReportUnhandledException((Exception)e.ExceptionObject);
683private async Task ReportUnhandledException(Exception exception)
690private string GetClientErrorMessage(Exception exception, string additionalInformation = null)
706private async Task TryNotifyClientErrorAsync(IClientProxy client, string error, Exception exception = null)
723catch (Exception ex)
787catch (Exception ex)
880public static partial void InitializationFailed(ILogger logger, Exception exception);
889public static partial void DisposeFailed(ILogger logger, CircuitId circuitId, Exception exception);
904private static partial void CircuitHandlerFailed(ILogger logger, Type handlerType, string handlerMethod, string message, Exception exception);
913public static partial void UpdateRootComponentsFailed(ILogger logger, Exception exception);
915public static void CircuitHandlerFailed(ILogger logger, CircuitHandler handler, string handlerMethod, Exception exception)
926public static partial void CircuitUnhandledException(ILogger logger, CircuitId circuitId, Exception exception);
935public static partial void CircuitTransmitErrorFailed(ILogger logger, CircuitId circuitId, Exception exception);
938public static partial void UnhandledExceptionClientDisconnected(ILogger logger, CircuitId circuitId, Exception exception);
944public static partial void DispatchEventFailedToParseEventData(ILogger logger, Exception ex);
947public static partial void DispatchEventFailedToDispatchEvent(ILogger logger, string eventHandlerId, Exception ex);
953private static partial void BeginInvokeDotNetFailed(ILogger logger, string methodIdentifier, long dotNetObjectId, string callId, Exception exception);
956public static partial void EndInvokeDispatchException(ILogger logger, Exception ex);
971public static partial void LocationChangeFailed(ILogger logger, string uri, CircuitId circuitId, Exception exception);
977public static partial void OnRenderCompletedFailed(ILogger logger, long renderId, CircuitId circuitId, Exception e);
983public static partial void ReceiveByteArrayException(ILogger logger, long id, Exception ex);
986public static partial void ReceiveJSDataChunkException(ILogger logger, long streamId, Exception ex);
989public static partial void SendDotNetStreamException(ILogger logger, long id, Exception ex);
1007private static partial void BeginInvokeDotNetStaticFailed(ILogger logger, string methodIdentifier, string assembly, string callId, Exception exception);
1009public static void BeginInvokeDotNetFailed(ILogger logger, string callId, string assemblyName, string methodIdentifier, long dotNetObjectId, Exception exception)
1022public static partial void LocationChangeFailedInCircuit(ILogger logger, string uri, CircuitId circuitId, Exception exception);
Circuits\CircuitRegistry.cs (10)
218catch (Exception ex)
290catch (Exception ex)
302catch (Exception ex)
345catch (Exception ex)
367private static partial void UnhandledExceptionDisposingCircuitHost(ILogger logger, string message, Exception exception);
369public static void UnhandledExceptionDisposingCircuitHost(ILogger logger, Exception exception)
373private static partial void ExceptionDisposingTokenSource(ILogger logger, string message, Exception exception);
375public static void ExceptionDisposingTokenSource(ILogger logger, Exception exception)
391public static partial void FailedToReconnectToCircuit(ILogger logger, CircuitId circuitId, Exception exception = null);
412public static partial void CircuitExceptionHandlerFailed(ILogger logger, CircuitId circuitId, Exception exception);
Circuits\RemoteJSRuntime.cs (5)
38public event EventHandler<Exception>? UnhandledException;
60internal void RaiseUnhandledException(Exception ex)
225private static partial void InvokeStaticDotNetMethodException(ILogger logger, string assemblyName, string methodIdentifier, string? callbackId, Exception exception);
228private static partial void InvokeInstanceDotNetMethodException(ILogger logger, string methodIdentifier, long dotNetObjectReference, string? callbackId, Exception exception);
236internal static void InvokeDotNetMethodException(ILogger logger, in DotNetInvocationInfo invocationInfo, Exception exception)
Microsoft.AspNetCore.Components.Server.Tests (8)
Microsoft.AspNetCore.Components.Tests (40)
Microsoft.AspNetCore.Components.Web (10)
Microsoft.AspNetCore.Components.Web.Tests (6)
Microsoft.AspNetCore.Components.WebAssembly (22)
Services\WebAssemblyConsoleLogger.cs (4)
44public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
61private void WriteMessage(LogLevel logLevel, string logName, int eventId, string message, Exception? exception)
107private static void CreateDefaultLogMessage(StringBuilder logBuilder, LogLevel logLevel, string logName, int eventId, string message, Exception? exception)
Microsoft.AspNetCore.Components.WebAssembly.Server (2)
Microsoft.AspNetCore.Components.WebAssembly.Tests (1)
Microsoft.AspNetCore.Components.WebView (10)
Microsoft.AspNetCore.Components.WebView.Maui (7)
Microsoft.AspNetCore.Components.WebView.Photino (7)
Microsoft.AspNetCore.Components.WebView.WindowsForms (8)
Microsoft.AspNetCore.Components.WebView.Wpf (6)
Microsoft.AspNetCore.Components.WebViewE2E.Test (4)
Microsoft.AspNetCore.ConcurrencyLimiter.Tests (1)
Microsoft.AspNetCore.Connections.Abstractions (6)
Microsoft.AspNetCore.Cors (2)
Microsoft.AspNetCore.Cors.Test (1)
Microsoft.AspNetCore.Cryptography.Internal (1)
Microsoft.AspNetCore.DataProtection (49)
LoggingExtensions.cs (15)
77public static partial void KeyIsIneligibleToBeTheDefaultKeyBecauseItsMethodFailed(this ILogger logger, Guid keyId, string methodName, Exception exception);
104public static partial void ExceptionWhileProcessingRevocationElement(this ILogger logger, XElement revocationElement, Exception exception);
113public static partial void ExceptionWhileProcessingKeyElement(this ILogger logger, XElement element, Exception exception);
116public static partial void AnExceptionOccurredWhileProcessingElementDebug(this ILogger logger, XElement element, Exception exception);
122public static partial void AnErrorOccurredWhileEncryptingToX509CertificateWithThumbprint(this ILogger logger, string thumbprint, Exception exception);
128public static partial void ExceptionWhileTryingToResolveCertificateWithThumbprint(this ILogger logger, string thumbprint, Exception exception);
170public static partial void ExceptionOccurredTryingToDecryptElement(this ILogger logger, Exception exception);
182public static partial void ErrorOccurredWhileRefreshingKeyRing(this ILogger logger, Exception exception);
185public static partial void ErrorOccurredWhileReadingKeyRing(this ILogger logger, Exception exception);
203public static partial void ErrorOccurredWhileEncryptingToWindowsDPAPI(this ILogger logger, Exception exception);
209public static partial void ErrorOccurredWhileEncryptingToWindowsDPAPING(this ILogger logger, Exception exception);
236public static partial void KeyRingFailedToLoadOnStartup(this ILogger logger, Exception innerException);
257public static partial void RetryingMethodOfKeyAfterFailure(this ILogger logger, Guid keyId, string methodName, Exception exception);
263public static partial void FailedToDeleteFile(this ILogger logger, string fileName, Exception exception);
269public static partial void FailedToRemoveDataFromRegistryKeyValue(this ILogger logger, RegistryKey registryKeyName, string valueName, Exception exception);
Microsoft.AspNetCore.DataProtection.Abstractions (5)
Microsoft.AspNetCore.DataProtection.Extensions (2)
Microsoft.AspNetCore.DataProtection.Tests (7)
Microsoft.AspNetCore.DeveloperCertificates.XPlat (27)
Microsoft.AspNetCore.DeveloperCertificates.XPlat.Tests (1)
Microsoft.AspNetCore.Diagnostics (30)
Microsoft.AspNetCore.Diagnostics.Abstractions (3)
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (16)
Microsoft.AspNetCore.Diagnostics.Middleware (2)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (5)
Microsoft.AspNetCore.Diagnostics.Tests (9)
Microsoft.AspNetCore.Grpc.JsonTranscoding (22)
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (6)
Microsoft.AspNetCore.Grpc.Swagger (1)
Microsoft.AspNetCore.HeaderParsing (2)
Microsoft.AspNetCore.HeaderPropagation.Tests (2)
Microsoft.AspNetCore.Hosting (51)
Internal\HostingMetrics.cs (1)
45public void RequestEnd(string protocol, string scheme, string method, string? route, int statusCode, bool unhandledRequest, Exception? exception, List<KeyValuePair<string, object?>>? customTags, long startTimestamp, long currentTimestamp, bool disableHttpRequestDurationMetric)
Microsoft.AspNetCore.Hosting.Server.Abstractions (1)
Microsoft.AspNetCore.Hosting.Tests (17)
HostingApplicationDiagnosticsTests.cs (5)
1133public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
1156public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
1199public void OnError(Exception error)
Microsoft.AspNetCore.Http (1)
Microsoft.AspNetCore.Http.Abstractions (3)
Microsoft.AspNetCore.Http.Abstractions.Tests (5)
Microsoft.AspNetCore.Http.Connections (21)
Microsoft.AspNetCore.Http.Connections.Client (38)
Microsoft.AspNetCore.Http.Connections.Common (1)
Microsoft.AspNetCore.Http.Connections.Tests (2)
Microsoft.AspNetCore.Http.Extensions (16)
RequestDelegateFactory.cs (7)
2650public static void InvalidJsonRequestBody(HttpContext httpContext, string parameterTypeName, string parameterName, Exception exception, bool shouldThrow)
2662private static partial void InvalidJsonRequestBody(ILogger logger, string parameterType, string parameterName, Exception exception);
2734public static void InvalidFormRequestBody(HttpContext httpContext, string parameterTypeName, string parameterName, Exception exception, bool shouldThrow)
2746private static partial void InvalidFormRequestBody(ILogger logger, string parameterType, string parameterName, Exception exception);
2748public static void InvalidAntiforgeryToken(HttpContext httpContext, string parameterTypeName, string parameterName, Exception exception, bool shouldThrow)
2760private static partial void InvalidAntiforgeryToken(ILogger logger, string parameterType, string parameterName, Exception exception);
2774private static partial void FormDataMappingFailed(ILogger logger, string parameterType, string parameterName, Exception exception);
src\Components\Endpoints\src\FormMapping\Converters\CompiledComplexTypeConverter.cs (1)
23catch (Exception ex)
Microsoft.AspNetCore.Http.Extensions.Tests (5)
Microsoft.AspNetCore.Http.Features (3)
Microsoft.AspNetCore.Http.Microbenchmarks (2)
Microsoft.AspNetCore.Http.Results.Tests (1)
Microsoft.AspNetCore.Http.Tests (4)
Microsoft.AspNetCore.HttpLogging (8)
Microsoft.AspNetCore.HttpLogging.Tests (1)
Microsoft.AspNetCore.HttpOverrides (2)
Microsoft.AspNetCore.Identity.Specification.Tests (2)
Microsoft.AspNetCore.Identity.Test (2)
Microsoft.AspNetCore.InternalTesting (24)
Microsoft.AspNetCore.InternalTesting.Tests (5)
Microsoft.AspNetCore.JsonPatch (4)
Microsoft.AspNetCore.MiddlewareAnalysis (1)
Microsoft.AspNetCore.MiddlewareAnalysis.Tests (1)
Microsoft.AspNetCore.Mvc.Abstractions (39)
ModelBinding\ModelStateDictionary.cs (10)
97/// <see cref="AddModelError(string, Exception, ModelMetadata)"/> or
98/// <see cref="TryAddModelError(string, Exception, ModelMetadata)"/>.
199/// Where <see cref="ModelMetadata"/> is available, use <see cref="AddModelError(string, Exception, ModelMetadata)"/> instead.
202/// <param name="exception">The <see cref="Exception"/> to add.</param>
207public bool TryAddModelException(string key, Exception exception)
236/// <param name="exception">The <see cref="Exception"/> to add. Some exception types will be replaced with
239public void AddModelError(string key, Exception exception, ModelMetadata metadata)
255/// <param name="exception">The <see cref="Exception"/> to add. Some exception types will be replaced with
262public bool TryAddModelError(string key, Exception exception, ModelMetadata metadata)
677private void AddModelErrorCore(string key, Exception exception)
Microsoft.AspNetCore.Mvc.Abstractions.Test (2)
Microsoft.AspNetCore.Mvc.Core (48)
Microsoft.AspNetCore.Mvc.Core.Test (20)
Microsoft.AspNetCore.Mvc.Core.TestCommon (5)
Microsoft.AspNetCore.Mvc.Formatters.Xml (6)
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (4)
Microsoft.AspNetCore.Mvc.NewtonsoftJson (5)
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (1)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
Microsoft.AspNetCore.Mvc.Razor.Test (1)
Microsoft.AspNetCore.Mvc.RazorPages (5)
Microsoft.AspNetCore.Mvc.RazorPages.Test (1)
Microsoft.AspNetCore.Mvc.TagHelpers (3)
Microsoft.AspNetCore.Mvc.TagHelpers.Test (6)
Microsoft.AspNetCore.Mvc.Testing (9)
Microsoft.AspNetCore.Mvc.ViewFeatures (9)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (12)
Microsoft.AspNetCore.OutputCaching (6)
Microsoft.AspNetCore.OutputCaching.Microbenchmarks (2)
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (10)
Microsoft.AspNetCore.OutputCaching.Tests (1)
Microsoft.AspNetCore.Owin (1)
Microsoft.AspNetCore.RateLimiting (7)
Microsoft.AspNetCore.RateLimiting.Tests (1)
Microsoft.AspNetCore.Razor.Runtime.Test (2)
Microsoft.AspNetCore.RequestDecompression.Tests (7)
Microsoft.AspNetCore.Rewrite (1)
Microsoft.AspNetCore.Routing (5)
Microsoft.AspNetCore.Routing.FunctionalTests (1)
Microsoft.AspNetCore.Routing.Tests (14)
Microsoft.AspNetCore.Server.HttpSys (78)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (55)
Microsoft.AspNetCore.Server.HttpSys.NonHelixTests (1)
Microsoft.AspNetCore.Server.IIS (57)
Microsoft.AspNetCore.Server.IISIntegration (1)
Microsoft.AspNetCore.Server.IntegrationTesting (10)
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (5)
Microsoft.AspNetCore.Server.Kestrel.Core (149)
Internal\Infrastructure\KestrelMetrics.cs (4)
101public void ConnectionStop(ConnectionMetricsContext metricsContext, Exception? exception, List<KeyValuePair<string, object?>>? customTags, long startTimestamp, long currentTimestamp)
110private void ConnectionStopCore(ConnectionMetricsContext metricsContext, Exception? exception, List<KeyValuePair<string, object?>>? customTags, long startTimestamp, long currentTimestamp)
283public void TlsHandshakeStop(ConnectionMetricsContext metricsContext, long startTimestamp, long currentTimestamp, SslProtocols? protocol = null, Exception? exception = null)
292private void TlsHandshakeStopCore(ConnectionMetricsContext metricsContext, long startTimestamp, long currentTimestamp, SslProtocols? protocol = null, Exception? exception = null)
Internal\Infrastructure\KestrelTrace.General.cs (4)
11public void ApplicationError(string connectionId, string traceIdentifier, Exception ex)
72public void RequestBodyDrainBodyReaderInvalidState(string connectionId, string traceIdentifier, Exception ex)
80public static partial void ApplicationError(ILogger logger, string connectionId, string traceIdentifier, Exception ex);
116public static partial void RequestBodyDrainBodyReaderInvalidState(ILogger logger, string connectionId, string traceIdentifier, Exception ex);
Internal\Infrastructure\KestrelTrace.Http2.cs (6)
22public void HPackDecodingError(string connectionId, int streamId, Exception ex)
45public void HPackEncodingError(string connectionId, int streamId, Exception ex)
83public void Http2UnexpectedConnectionQueueError(string connectionId, Exception ex)
112public static partial void HPackDecodingError(ILogger logger, string connectionId, int streamId, Exception ex);
124public static partial void HPackEncodingError(ILogger logger, string connectionId, int streamId, Exception ex);
145public static partial void Http2UnexpectedConnectionQueueError(ILogger logger, string connectionId, Exception ex);
Internal\Infrastructure\KestrelTrace.Http3.cs (6)
52public void Http3OutboundControlStreamError(string connectionId, Exception ex)
57public void QPackDecodingError(string connectionId, long streamId, Exception ex)
62public void QPackEncodingError(string connectionId, long streamId, Exception ex)
93public static partial void Http3OutboundControlStreamError(ILogger logger, string connectionId, Exception ex);
96public static partial void QPackDecodingError(ILogger logger, string connectionId, long streamId, Exception ex);
99public static partial void QPackEncodingError(ILogger logger, string connectionId, long streamId, Exception ex);
Middleware\HttpsConnectionMiddleware.cs (6)
239static void RecordHandshakeFailed(KestrelMetrics metrics, long startTimestamp, long currentTimestamp, ConnectionMetricsContext metricsContext, IConnectionMetricsTagsFeature? metricsTagsFeature, Exception ex)
265catch (Exception exception) when (exception is CryptographicException || exception is SecurityException)
584public static partial void AuthenticationFailed(this ILogger<HttpsConnectionMiddleware> logger, Exception exception);
611public static partial void FailedToFindCertificateInStore(this ILogger<HttpsConnectionMiddleware> logger, Exception exception);
614public static partial void FailedToOpenStore(this ILogger<HttpsConnectionMiddleware> logger, string? storeName, Exception exception);
619public static void FailedToOpenStore(this ILogger<HttpsConnectionMiddleware> logger, StoreLocation storeLocation, Exception exception)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (73)
BodyControlTests.cs (18)
24var ex = new Exception("My error");
29await Assert.ThrowsAsync<Exception>(() => request.ReadAsync(new byte[1], 0, 1)));
31await Assert.ThrowsAsync<Exception>(async () => await requestPipe.ReadAsync()));
41var ex = new Exception("My error");
48await Assert.ThrowsAsync<Exception>(() => request.ReadAsync(new byte[1], 0, 1)));
51await Assert.ThrowsAsync<Exception>(() => upgrade.ReadAsync(new byte[1], 0, 1)));
54await Assert.ThrowsAsync<Exception>(async () => await requestPipe.ReadAsync()));
65var ex = new Exception("My error");
74await Assert.ThrowsAsync<Exception>(() => request.ReadAsync(new byte[1], 0, 1)));
77await Assert.ThrowsAsync<Exception>(() => upgrade.ReadAsync(new byte[1], 0, 1)));
79await Assert.ThrowsAsync<Exception>(async () => await requestPipe.ReadAsync()));
90var ex = new Exception("My error");
95Assert.Throws<Exception>(() => requestPipe.AdvanceTo(new SequencePosition())));
97Assert.Throws<Exception>(() => requestPipe.AdvanceTo(new SequencePosition(), new SequencePosition())));
99Assert.Throws<Exception>(() => requestPipe.CancelPendingRead()));
101Assert.Throws<Exception>(() => requestPipe.TryRead(out var res)));
103Assert.Throws<Exception>(() => requestPipe.Complete()));
159public override void Complete(Exception exception)
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (27)
Microsoft.AspNetCore.Server.Kestrel.Tests (1)
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (24)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (46)
Internal\QuicLog.cs (8)
47private static partial void ConnectionErrorCore(ILogger logger, string connectionId, Exception ex);
49public static void ConnectionError(ILogger logger, BaseConnectionContext connection, Exception ex)
58private static partial void ConnectionAbortedCore(ILogger logger, string connectionId, long errorCode, Exception ex);
60public static void ConnectionAborted(ILogger logger, BaseConnectionContext connection, long errorCode, Exception ex)
80private static partial void StreamErrorCore(ILogger logger, string connectionId, Exception ex);
82public static void StreamError(ILogger logger, QuicStreamContext streamContext, Exception ex)
211public static partial void ConnectionListenerAborted(ILogger logger, Exception exception);
236public static partial void ConnectionListenerAcceptConnectionFailed(ILogger logger, Exception exception);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (5)
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (21)
Microsoft.AspNetCore.Session (7)
Microsoft.AspNetCore.Shared.Tests (28)
Microsoft.AspNetCore.SignalR.Client.Core (59)
HubConnection.Log.cs (20)
79public static partial void FailedToSendInvocation(ILogger logger, string invocationId, Exception exception);
103public static partial void ShutdownWithError(ILogger logger, Exception exception);
145public static partial void ErrorDuringClosedEvent(ILogger logger, Exception exception);
154public static partial void ErrorInvokingClientSideMethod(ILogger logger, string methodName, Exception exception);
157public static partial void ErrorReceivingHandshakeResponse(ILogger logger, Exception exception);
181public static partial void ErrorStartingConnection(ILogger logger, Exception ex);
210public static partial void ServerDisconnectedWithError(ILogger logger, Exception ex);
237public static partial void ArgumentBindingFailure(ILogger logger, string? invocationId, string methodName, Exception exception);
264public static partial void ReconnectingWithError(ILogger logger, Exception exception);
276public static partial void ReconnectAttemptFailed(ILogger logger, Exception exception);
279public static partial void ErrorDuringReconnectingEvent(ILogger logger, Exception exception);
282public static partial void ErrorDuringReconnectedEvent(ILogger logger, Exception exception);
285public static partial void ErrorDuringNextRetryDelay(ILogger logger, Exception exception);
300public static partial void ErrorInvalidHandshakeResponse(ILogger logger, Exception exception);
302public static void ErrorHandshakeTimedOut(ILogger logger, TimeSpan handshakeTimeout, Exception exception)
306private static partial void ErrorHandshakeTimedOut(ILogger logger, double HandshakeTimeoutSeconds, Exception exception);
309public static partial void ErrorHandshakeCanceled(ILogger logger, Exception exception);
312public static partial void ErroredStream(ILogger logger, string streamId, Exception exception);
324public static partial void ErrorSendingInvocationResult(ILogger logger, string invocationId, string target, Exception exception);
327public static partial void ErrorSendingStreamCompletion(ILogger logger, string streamId, Exception exception);
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (87)
Microsoft.AspNetCore.SignalR.Client.Tests (74)
Microsoft.AspNetCore.SignalR.Common (6)
Microsoft.AspNetCore.SignalR.Core (53)
Microsoft.AspNetCore.SignalR.Microbenchmarks (2)
Microsoft.AspNetCore.SignalR.Protocols.Json (8)
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (14)
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (10)
Microsoft.AspNetCore.SignalR.Specification.Tests (1)
Microsoft.AspNetCore.SignalR.StackExchangeRedis (17)
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (2)
Microsoft.AspNetCore.SignalR.Tests (31)
TestFilters.cs (10)
35public async Task OnDisconnectedAsync(HubLifetimeContext context, Exception exception, Func<HubLifetimeContext, Exception, Task> next)
66public async Task OnDisconnectedAsync(HubLifetimeContext context, Exception exception, Func<HubLifetimeContext, Exception, Task> next)
97public Task OnDisconnectedAsync(HubLifetimeContext context, Exception exception, Func<HubLifetimeContext, Exception, Task> next)
121public async Task OnDisconnectedAsync(HubLifetimeContext context, Exception exception, Func<HubLifetimeContext, Exception, Task> next)
165public Task OnDisconnectedAsync(HubLifetimeContext context, Exception exception, Func<HubLifetimeContext, Exception, Task> next)
Microsoft.AspNetCore.SignalR.Tests.Utils (7)
src\Shared\SignalR\LogSinkProvider.cs (4)
32public void Log<TState>(string categoryName, LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
71public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
Microsoft.AspNetCore.SpaProxy (6)
Microsoft.AspNetCore.SpaServices.Extensions (2)
Microsoft.AspNetCore.SpaServices.Extensions.Tests (5)
ListLoggerFactory.cs (5)
28public List<(LogLevel Level, EventId Id, string Message, object State, Exception Exception)> Log => Logger.LoggedEvents;
68public List<(LogLevel, EventId, string, object, Exception)> LoggedEvents { get; }
69= new List<(LogLevel, EventId, string, object, Exception)>();
80LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
Microsoft.AspNetCore.StaticAssets (1)
Microsoft.AspNetCore.StaticFiles (1)
Microsoft.AspNetCore.StaticFiles.FunctionalTests (2)
Microsoft.AspNetCore.TestHost (23)
Microsoft.AspNetCore.TestHost.Tests (18)
ClientHandlerTests.cs (7)
585catch (Exception ex)
619internal override void DisposeContext(object context, Exception exception)
624void IHttpApplication<TestHostingContext>.DisposeContext(TestHostingContext context, Exception exception)
663internal override void DisposeContext(object context, Exception exception)
668void IHttpApplication<TestHostingContext>.DisposeContext(TestHostingContext context, Exception exception)
719public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter) => formatter(state, exception);
Microsoft.AspNetCore.Testing (2)
Microsoft.AspNetCore.Testing.Tests (8)
Microsoft.AspNetCore.Tests (3)
Microsoft.AspNetCore.WebSockets.ConformanceTests (1)
Microsoft.AspNetCore.WebSockets.Tests (10)
Microsoft.AspNetCore.WebUtilities.Tests (1)
Microsoft.Build (334)
BackEnd\Components\Logging\ILoggingService.cs (5)
24internal delegate void LoggingExceptionDelegate(Exception e);
417void LogFatalBuildError(BuildEventContext buildEventContext, Exception exception, BuildEventFileInfo file);
426void LogFatalTaskError(BuildEventContext buildEventContext, Exception exception, BuildEventFileInfo file, string taskName);
436void LogFatalError(BuildEventContext buildEventContext, Exception exception, BuildEventFileInfo file, string messageResourceName, params object[] messageArgs);
447void LogTaskWarningFromException(BuildEventContext buildEventContext, Exception exception, BuildEventFileInfo file, string taskName);
BackEnd\Components\Logging\LoggingServiceLogMethods.cs (4)
194public void LogFatalBuildError(BuildEventContext buildEventContext, Exception exception, BuildEventFileInfo file)
208public void LogFatalTaskError(BuildEventContext buildEventContext, Exception exception, BuildEventFileInfo file, string taskName)
225public void LogFatalError(BuildEventContext buildEventContext, Exception exception, BuildEventFileInfo file, string messageResourceName, params object[] messageArgs)
259public void LogTaskWarningFromException(BuildEventContext buildEventContext, Exception exception, BuildEventFileInfo file, string taskName)
ErrorUtilities.cs (8)
67internal static void ThrowInternalError(string message, Exception? innerException, params object?[]? args)
354internal static void ThrowArgument(Exception? innerException, string resourceName, params object?[]? args)
406internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName)
418internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0)
431internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0, object arg1)
444internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0, object arg1, object arg2)
457internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0, object arg1, object arg2, object arg3)
585throw new ArgumentNullException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword(resourceName, parameterName), (Exception?)null);
Microsoft.Build.CommandLine.UnitTests (2)
Microsoft.Build.Engine.OM.UnitTests (31)
ErrorUtilities.cs (8)
67internal static void ThrowInternalError(string message, Exception? innerException, params object?[]? args)
354internal static void ThrowArgument(Exception? innerException, string resourceName, params object?[]? args)
406internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName)
418internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0)
431internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0, object arg1)
444internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0, object arg1, object arg2)
457internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0, object arg1, object arg2, object arg3)
585throw new ArgumentNullException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword(resourceName, parameterName), (Exception?)null);
Microsoft.Build.Engine.UnitTests (96)
BackEnd\EventSourceSink_Tests.cs (26)
94List<Exception> exceptionList = new List<Exception>();
99foreach (Exception exception in exceptionList)
175catch (Exception e)
185catch (Exception e)
193Exception[] exceptionArray = new Exception[] { new IndexOutOfRangeException(), new Exception() }; //// two non-critical exceptions
196catch (Exception e)
204Exception[] exceptionArray1 = new Exception[] { new IndexOutOfRangeException(), new Exception() }; //// two non-critical exceptions
207Exception[] exceptionArray2 = new Exception[] { ae1, new Exception() }; //// two non-critical exceptions (ae1 contains nested exceptions)
210catch (Exception e)
220catch (Exception e)
228Exception[] exceptionArray = new Exception[] { new OutOfMemoryException(), new IndexOutOfRangeException(), new Exception() }; //// two non-critical exceptions, one critical
231catch (Exception e)
239Exception[] exceptionArray1 = new Exception[] { new OutOfMemoryException(), new IndexOutOfRangeException(), new Exception() }; //// two non-critical exceptions, one critical
242Exception[] exceptionArray2 = new Exception[] { ae1, new Exception() }; //// one critical one non-critical (ae1 contains nested critical exception)
245catch (Exception e)
258private static void RaiseExceptionInEventHandler(BuildEventArgs buildEventToRaise, Exception exceptionToRaise)
267catch (Exception e)
396private Exception _exceptionInHandlers;
423internal EventHandlerHelper(IEventSource source, Exception exceptionToThrow)
BackEnd\MockLoggingService.cs (4)
419public void LogFatalBuildError(BuildEventContext buildEventContext, Exception exception, BuildEventFileInfo file)
431public void LogFatalTaskError(BuildEventContext buildEventContext, Exception exception, BuildEventFileInfo file, string taskName)
443public void LogFatalError(BuildEventContext buildEventContext, Exception exception, BuildEventFileInfo file, string messageResourceName, params object[] messageArgs)
454public void LogTaskWarningFromException(BuildEventContext buildEventContext, Exception exception, BuildEventFileInfo file, string taskName)
Microsoft.Build.Framework (40)
BuildException\BuildExceptionSerializationHelper.cs (9)
14public TypeConstructionTuple(Type type, Func<string, Exception?, BuildExceptionBase> factory)
21public Func<string, Exception?, BuildExceptionBase> Factory { get; }
24private static Dictionary<string, Func<string, Exception?, BuildExceptionBase>>? s_exceptionFactories;
26private static readonly Func<string, Exception?, BuildExceptionBase> s_defaultFactory =
33type.IsSubclassOf(typeof(Exception)) &&
49var exceptionFactories = new Dictionary<string, Func<string, Exception?, BuildExceptionBase>>();
54Func<string, Exception?, BuildExceptionBase> exceptionFactory = typeConstructionTuple.Factory;
76internal static Func<string, Exception?, BuildExceptionBase> CreateExceptionFactory(string serializationType)
78Func<string, Exception?, BuildExceptionBase>? factory = null;
Microsoft.Build.Tasks.CodeAnalysis (29)
Microsoft.Build.Tasks.Core (175)
ErrorUtilities.cs (8)
67internal static void ThrowInternalError(string message, Exception? innerException, params object?[]? args)
354internal static void ThrowArgument(Exception? innerException, string resourceName, params object?[]? args)
406internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName)
418internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0)
431internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0, object arg1)
444internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0, object arg1, object arg2)
457internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0, object arg1, object arg2, object arg3)
585throw new ArgumentNullException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword(resourceName, parameterName), (Exception?)null);
Microsoft.Build.Tasks.UnitTests (13)
Microsoft.Build.UnGAC (1)
Microsoft.Build.UnitTests.Shared (9)
Microsoft.Build.Utilities.Core (77)
ErrorUtilities.cs (8)
67internal static void ThrowInternalError(string message, Exception? innerException, params object?[]? args)
354internal static void ThrowArgument(Exception? innerException, string resourceName, params object?[]? args)
406internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName)
418internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0)
431internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0, object arg1)
444internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0, object arg1, object arg2)
457internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0, object arg1, object arg2, object arg3)
585throw new ArgumentNullException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword(resourceName, parameterName), (Exception?)null);
Microsoft.Build.Utilities.UnitTests (11)
Microsoft.CodeAnalysis (224)
DiagnosticAnalyzer\AnalyzerDriver.cs (9)
490Action<Exception, DiagnosticAnalyzer, Diagnostic, CancellationToken> newOnAnalyzerException = (ex, analyzer, diagnostic, cancellationToken) =>
720var innerException = faultedTask.Exception?.InnerException;
824Action<Exception, DiagnosticAnalyzer, Diagnostic> onAnalyzerException =
827Func<Exception, bool>? nullFilter = null;
837Action<Exception, DiagnosticAnalyzer, Diagnostic> onAnalyzerException,
838Func<Exception, bool>? analyzerExceptionFilter,
1569catch (Exception e) when (FatalError.ReportAndPropagateUnlessCanceled(e, cancellationToken))
1628catch (Exception e) when (FatalError.ReportAndPropagateUnlessCanceled(e, cancellationToken))
2740catch (Exception ex) when (ex is InsufficientExecutionStackException)
DiagnosticAnalyzer\AnalyzerExecutor.cs (18)
38private readonly Func<Exception, bool>? _analyzerExceptionFilter;
102Action<Exception, DiagnosticAnalyzer, Diagnostic, CancellationToken> onAnalyzerException,
103Func<Exception, bool>? analyzerExceptionFilter,
134Action<Exception, DiagnosticAnalyzer, Diagnostic, CancellationToken> onAnalyzerException,
135Func<Exception, bool>? analyzerExceptionFilter,
178internal Action<Exception, DiagnosticAnalyzer, Diagnostic, CancellationToken> OnAnalyzerException { get; }
1211catch (Exception ex) when (HandleAnalyzerException(analyzer, ex, info) &&
1217private bool HandleAnalyzerException(DiagnosticAnalyzer analyzer, Exception ex, in AnalysisContextInfo? info)
1230Exception exception,
1233Action<Exception, DiagnosticAnalyzer, Diagnostic, CancellationToken> onAnalyzerException,
1234Func<Exception, bool>? analyzerExceptionFilter,
1248catch (Exception)
1255static bool ExceptionFilter(Exception ex, Func<Exception, bool>? analyzerExceptionFilter, CancellationToken cancellationToken)
1271internal static Diagnostic CreateAnalyzerExceptionDiagnostic(DiagnosticAnalyzer analyzer, Exception e, AnalysisContextInfo? info = null)
1282private static string CreateDiagnosticDescription(AnalysisContextInfo? info, Exception e)
1307catch (Exception ex)
1320internal static Diagnostic CreateDriverExceptionDiagnostic(Exception e)
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (6)
807catch (Exception e) when (FatalError.ReportAndPropagateUnlessCanceled(e, cancellationToken))
1221Action<Exception, DiagnosticAnalyzer, Diagnostic>? onAnalyzerException = null)
1232Action<Exception, DiagnosticAnalyzer, Diagnostic, CancellationToken> wrappedOnAnalyzerException =
1241catch (Exception ex) when (AnalyzerExecutor.HandleAnalyzerException(ex, analyzer, info: null, wrappedOnAnalyzerException, analyzerExceptionFilter: null, CancellationToken.None))
1253catch (Exception ex) when (AnalyzerExecutor.HandleAnalyzerException(ex, suppressor, info: null, wrappedOnAnalyzerException, analyzerExceptionFilter: null, CancellationToken.None))
1287catch (Exception e) when (FatalError.ReportAndPropagateUnlessCanceled(e, cancellationToken))
DiagnosticAnalyzer\CompilationWithAnalyzersOptions.cs (8)
15private readonly Action<Exception, DiagnosticAnalyzer, Diagnostic>? _onAnalyzerException;
16private readonly Func<Exception, bool>? _analyzerExceptionFilter;
29public Action<Exception, DiagnosticAnalyzer, Diagnostic>? OnAnalyzerException => _onAnalyzerException;
34public Func<Exception, bool>? AnalyzerExceptionFilter => _analyzerExceptionFilter;
60Action<Exception, DiagnosticAnalyzer, Diagnostic>? onAnalyzerException,
77Action<Exception, DiagnosticAnalyzer, Diagnostic>? onAnalyzerException,
96Action<Exception, DiagnosticAnalyzer, Diagnostic>? onAnalyzerException,
100Func<Exception, bool>? analyzerExceptionFilter)
InternalUtilities\FatalError.cs (11)
21public OperationCanceledIgnoringCallerTokenException(Exception innerException)
29public delegate void ErrorReporterHandler(Exception exception, ErrorSeverity severity, bool forceDump);
35private static Exception? s_reportedException;
43/// cref="ReportNonFatalError(Exception, ErrorSeverity, bool)"/></param>
99public static bool ReportAndPropagate(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized)
111public static bool ReportAndPropagateUnlessCanceled(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized)
140public static bool ReportAndPropagateUnlessCanceled(Exception exception, CancellationToken contextCancellationToken, ErrorSeverity severity = ErrorSeverity.Uncategorized)
161public static bool ReportAndCatch(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized)
237private static void Report(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized, bool forceDump = false)
248public static void ReportNonFatalError(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized, bool forceDump = false)
253private static void ReportException(Exception exception, ErrorSeverity severity, bool forceDump, ErrorReporterHandler? handler)
SourceGeneration\GeneratorDriver.cs (5)
249Exception? ex = null;
254catch (Exception e) when (handleGeneratorException(compilation, MessageProvider, sourceGenerator, e, isInit: true))
339static bool handleGeneratorException(Compilation compilation, CommonMessageProvider messageProvider, ISourceGenerator sourceGenerator, Exception e, bool isInit)
381private static GeneratorState SetGeneratorException(Compilation compilation, CommonMessageProvider provider, GeneratorState generatorState, ISourceGenerator generator, Exception e, DiagnosticBag? diagnosticBag, CancellationToken cancellationToken, TimeSpan? runTime = null, bool isInit = false)
399private static Diagnostic CreateGeneratorExceptionDiagnostic(CommonMessageProvider provider, ISourceGenerator generator, Exception e, bool isInit)
Microsoft.CodeAnalysis.CodeStyle (57)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
67catch (Exception ex)
src\Compilers\Core\Portable\InternalUtilities\FatalError.cs (14)
21public OperationCanceledIgnoringCallerTokenException(Exception innerException)
29public delegate void ErrorReporterHandler(Exception exception, ErrorSeverity severity, bool forceDump);
35private static Exception? s_reportedException;
43/// cref="ReportNonFatalError(Exception, ErrorSeverity, bool)"/></param>
99public static bool ReportAndPropagate(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized)
111public static bool ReportAndPropagateUnlessCanceled(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized)
140public static bool ReportAndPropagateUnlessCanceled(Exception exception, CancellationToken contextCancellationToken, ErrorSeverity severity = ErrorSeverity.Uncategorized)
161public static bool ReportAndCatch(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized)
173public static bool ReportWithDumpAndCatch(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized)
186public static bool ReportAndCatchUnlessCanceled(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized)
216public static bool ReportAndCatchUnlessCanceled(Exception exception, CancellationToken contextCancellationToken, ErrorSeverity severity = ErrorSeverity.Uncategorized)
237private static void Report(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized, bool forceDump = false)
248public static void ReportNonFatalError(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized, bool forceDump = false)
253private static void ReportException(Exception exception, ErrorSeverity severity, bool forceDump, ErrorReporterHandler? handler)
Microsoft.CodeAnalysis.CodeStyle.Fixes (7)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Helpers\MefHostServicesHelpers.cs (1)
51catch (Exception)
Microsoft.CodeAnalysis.Collections.Package (8)
Microsoft.CodeAnalysis.CSharp (9)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (2)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (12)
Microsoft.CodeAnalysis.CSharp.EndToEnd.UnitTests (6)
Microsoft.CodeAnalysis.CSharp.Features (18)
Microsoft.CodeAnalysis.CSharp.Scripting (1)
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (9)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (21)
SourceGeneration\SyntaxAwareGeneratorTests.cs (16)
375var exception = new Exception("Test Exception");
393GeneratorDriverTests.VerifyGeneratorExceptionDiagnostic<Exception>(outputDiagnostics.Single(), nameof(CallbackGenerator), "Test Exception");
417var exception = new Exception("Test Exception");
435GeneratorDriverTests.VerifyGeneratorExceptionDiagnostic<Exception>(outputDiagnostics.Single(), nameof(CallbackGenerator), "Test Exception");
501var exception = new Exception("Test Exception");
531GeneratorDriverTests.VerifyGeneratorExceptionDiagnostic<Exception>(outputDiagnostics.Single(), nameof(CallbackGenerator), "Test Exception");
556var exception = new Exception("test exception");
568GeneratorDriverTests.VerifyGeneratorExceptionDiagnostic<Exception>(outputDiagnostics.Single(), nameof(CallbackGenerator), "test exception", initialization: true);
624var exception = new Exception("test exception");
640GeneratorDriverTests.VerifyGeneratorExceptionDiagnostic<Exception>(outputDiagnostics.Single(), nameof(CallbackGenerator), "test exception", initialization: true);
1855var exception = new Exception("Test Exception");
1872GeneratorDriverTests.VerifyGeneratorExceptionDiagnostic<Exception>(outputDiagnostics.Single(), nameof(PipelineCallbackGenerator), "Test Exception");
1896var exception = new Exception("Test Exception");
1913GeneratorDriverTests.VerifyGeneratorExceptionDiagnostic<Exception>(outputDiagnostics.Single(), nameof(PipelineCallbackGenerator), "Test Exception");
1937var exception = new Exception("Test Exception");
1962GeneratorDriverTests.VerifyGeneratorExceptionDiagnostic<Exception>(outputDiagnostics.Single(), nameof(PipelineCallbackGenerator), "Test Exception");
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (3)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (7)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (3)
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
Microsoft.CodeAnalysis.EditorFeatures (38)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (4)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
Microsoft.CodeAnalysis.EditorFeatures.Wpf (13)
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (20)
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (8)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (35)
src\Compilers\Core\Portable\InternalUtilities\FatalError.cs (14)
21public OperationCanceledIgnoringCallerTokenException(Exception innerException)
29public delegate void ErrorReporterHandler(Exception exception, ErrorSeverity severity, bool forceDump);
35private static Exception? s_reportedException;
43/// cref="ReportNonFatalError(Exception, ErrorSeverity, bool)"/></param>
99public static bool ReportAndPropagate(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized)
111public static bool ReportAndPropagateUnlessCanceled(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized)
140public static bool ReportAndPropagateUnlessCanceled(Exception exception, CancellationToken contextCancellationToken, ErrorSeverity severity = ErrorSeverity.Uncategorized)
161public static bool ReportAndCatch(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized)
173public static bool ReportWithDumpAndCatch(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized)
186public static bool ReportAndCatchUnlessCanceled(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized)
216public static bool ReportAndCatchUnlessCanceled(Exception exception, CancellationToken contextCancellationToken, ErrorSeverity severity = ErrorSeverity.Uncategorized)
237private static void Report(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized, bool forceDump = false)
248public static void ReportNonFatalError(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized, bool forceDump = false)
253private static void ReportException(Exception exception, ErrorSeverity severity, bool forceDump, ErrorReporterHandler? handler)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (48)
src\Compilers\Core\Portable\InternalUtilities\FatalError.cs (14)
21public OperationCanceledIgnoringCallerTokenException(Exception innerException)
29public delegate void ErrorReporterHandler(Exception exception, ErrorSeverity severity, bool forceDump);
35private static Exception? s_reportedException;
43/// cref="ReportNonFatalError(Exception, ErrorSeverity, bool)"/></param>
99public static bool ReportAndPropagate(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized)
111public static bool ReportAndPropagateUnlessCanceled(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized)
140public static bool ReportAndPropagateUnlessCanceled(Exception exception, CancellationToken contextCancellationToken, ErrorSeverity severity = ErrorSeverity.Uncategorized)
161public static bool ReportAndCatch(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized)
173public static bool ReportWithDumpAndCatch(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized)
186public static bool ReportAndCatchUnlessCanceled(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized)
216public static bool ReportAndCatchUnlessCanceled(Exception exception, CancellationToken contextCancellationToken, ErrorSeverity severity = ErrorSeverity.Uncategorized)
237private static void Report(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized, bool forceDump = false)
248public static void ReportNonFatalError(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized, bool forceDump = false)
253private static void ReportException(Exception exception, ErrorSeverity severity, bool forceDump, ErrorReporterHandler? handler)
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (1)
Microsoft.CodeAnalysis.ExternalAccess.Razor (1)
Microsoft.CodeAnalysis.Features (96)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
67catch (Exception ex)
Microsoft.CodeAnalysis.Features.UnitTests (3)
Microsoft.CodeAnalysis.InteractiveHost (48)
src\Compilers\Core\Portable\InternalUtilities\FatalError.cs (14)
21public OperationCanceledIgnoringCallerTokenException(Exception innerException)
29public delegate void ErrorReporterHandler(Exception exception, ErrorSeverity severity, bool forceDump);
35private static Exception? s_reportedException;
43/// cref="ReportNonFatalError(Exception, ErrorSeverity, bool)"/></param>
99public static bool ReportAndPropagate(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized)
111public static bool ReportAndPropagateUnlessCanceled(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized)
140public static bool ReportAndPropagateUnlessCanceled(Exception exception, CancellationToken contextCancellationToken, ErrorSeverity severity = ErrorSeverity.Uncategorized)
161public static bool ReportAndCatch(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized)
173public static bool ReportWithDumpAndCatch(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized)
186public static bool ReportAndCatchUnlessCanceled(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized)
216public static bool ReportAndCatchUnlessCanceled(Exception exception, CancellationToken contextCancellationToken, ErrorSeverity severity = ErrorSeverity.Uncategorized)
237private static void Report(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized, bool forceDump = false)
248public static void ReportNonFatalError(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized, bool forceDump = false)
253private static void ReportException(Exception exception, ErrorSeverity severity, bool forceDump, ErrorReporterHandler? handler)
Microsoft.CodeAnalysis.LanguageServer (23)
Microsoft.CodeAnalysis.LanguageServer.Protocol (37)
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\AbstractLanguageServer.cs (1)
305catch (Exception)
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\RequestExecutionQueue.cs (1)
283catch (Exception ex)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (11)
Microsoft.CodeAnalysis.LanguageServer.UnitTests (2)
Microsoft.CodeAnalysis.Remote.ServiceHub (20)
Microsoft.CodeAnalysis.Remote.Workspaces (41)
BrokeredServiceConnection.cs (17)
107catch (Exception exception) when (ReportUnexpectedException(exception, cancellationToken))
121catch (Exception exception) when (ReportUnexpectedException(exception, cancellationToken))
140catch (Exception exception) when (ReportUnexpectedException(exception, cancellationToken))
156catch (Exception exception) when (ReportUnexpectedException(exception, cancellationToken))
174catch (Exception exception) when (ReportUnexpectedException(exception, cancellationToken))
189catch (Exception exception) when (ReportUnexpectedException(exception, cancellationToken))
207catch (Exception exception) when (ReportUnexpectedException(exception, cancellationToken))
222catch (Exception exception) when (ReportUnexpectedException(exception, cancellationToken))
243catch (Exception exception) when (ReportUnexpectedException(exception, cancellationToken))
260catch (Exception exception) when (ReportUnexpectedException(exception, cancellationToken))
281catch (Exception exception) when (ReportUnexpectedException(exception, cancellationToken))
298catch (Exception exception) when (ReportUnexpectedException(exception, cancellationToken))
317catch (Exception exception) when (ReportUnexpectedException(exception, cancellationToken))
326private bool ReportUnexpectedException(Exception exception, CancellationToken cancellationToken)
351private static bool IsRemoteIOException(Exception exception)
354private void OnUnexpectedException(Exception exception, CancellationToken cancellationToken)
379Exception? internalException = null;
Microsoft.CodeAnalysis.Scripting (37)
Script.cs (10)
195public Task<ScriptState> RunAsync(object globals = null, Func<Exception, bool> catchException = null, CancellationToken cancellationToken = default(CancellationToken))
198internal abstract Task<ScriptState> CommonRunAsync(object globals, Func<Exception, bool> catchException, CancellationToken cancellationToken);
223public Task<ScriptState> RunFromAsync(ScriptState previousState, Func<Exception, bool> catchException = null, CancellationToken cancellationToken = default(CancellationToken))
226internal abstract Task<ScriptState> CommonRunFromAsync(ScriptState previousState, Func<Exception, bool> catchException, CancellationToken cancellationToken);
381internal override Task<ScriptState> CommonRunAsync(object globals, Func<Exception, bool> catchException, CancellationToken cancellationToken)
384internal override Task<ScriptState> CommonRunFromAsync(ScriptState previousState, Func<Exception, bool> catchException, CancellationToken cancellationToken)
487public new Task<ScriptState<T>> RunAsync(object globals = null, Func<Exception, bool> catchException = null, CancellationToken cancellationToken = default(CancellationToken))
547public new Task<ScriptState<T>> RunFromAsync(ScriptState previousState, Func<Exception, bool> catchException = null, CancellationToken cancellationToken = default(CancellationToken))
579Func<Exception, bool> catchExceptionOpt,
582var exceptionOpt = (catchExceptionOpt != null) ? new StrongBox<Exception>() : null;
ScriptState.cs (5)
35public Exception Exception { get; }
42internal ScriptState(ScriptExecutionState executionState, Script script, Exception exceptionOpt)
156public Task<ScriptState<object>> ContinueWithAsync(string code, ScriptOptions options = null, Func<Exception, bool> catchException = null, CancellationToken cancellationToken = default(CancellationToken))
180public Task<ScriptState<TResult>> ContinueWithAsync<TResult>(string code, ScriptOptions options = null, Func<Exception, bool> catchException = null, CancellationToken cancellationToken = default(CancellationToken))
275internal ScriptState(ScriptExecutionState executionState, Script script, T value, Exception exceptionOpt)
Microsoft.CodeAnalysis.Scripting.TestUtilities (3)
Microsoft.CodeAnalysis.Test.Utilities (24)
Diagnostics\DiagnosticExtensions.cs (9)
146Action<Exception, DiagnosticAnalyzer, Diagnostic> onAnalyzerException = null)
156Action<Exception, DiagnosticAnalyzer, Diagnostic> onAnalyzerException = null,
168Action<Exception, DiagnosticAnalyzer, Diagnostic> onAnalyzerException = null,
181Action<Exception, DiagnosticAnalyzer, Diagnostic> onAnalyzerException = null,
193Action<Exception, DiagnosticAnalyzer, Diagnostic> onAnalyzerException = null,
205Action<Exception, DiagnosticAnalyzer, Diagnostic> onAnalyzerException = null,
227Action<Exception, DiagnosticAnalyzer, Diagnostic> onAnalyzerException,
285Action<Exception, DiagnosticAnalyzer, Diagnostic> onAnalyzerException = null,
299Action<Exception, DiagnosticAnalyzer, Diagnostic> onAnalyzerException,
Microsoft.CodeAnalysis.UnitTests (9)
Microsoft.CodeAnalysis.VisualBasic (2)
Microsoft.CodeAnalysis.Workspaces (150)
FindSymbols\TopLevelSyntaxTree\TopLevelSyntaxTreeIndex.DeclarationInfo.cs (1)
28catch (Exception)
FindSymbols\TopLevelSyntaxTree\TopLevelSyntaxTreeIndex.ExtensionMethodInfo.cs (1)
69catch (Exception)
src\Compilers\Core\Portable\InternalUtilities\FatalError.cs (14)
21public OperationCanceledIgnoringCallerTokenException(Exception innerException)
29public delegate void ErrorReporterHandler(Exception exception, ErrorSeverity severity, bool forceDump);
35private static Exception? s_reportedException;
43/// cref="ReportNonFatalError(Exception, ErrorSeverity, bool)"/></param>
99public static bool ReportAndPropagate(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized)
111public static bool ReportAndPropagateUnlessCanceled(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized)
140public static bool ReportAndPropagateUnlessCanceled(Exception exception, CancellationToken contextCancellationToken, ErrorSeverity severity = ErrorSeverity.Uncategorized)
161public static bool ReportAndCatch(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized)
173public static bool ReportWithDumpAndCatch(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized)
186public static bool ReportAndCatchUnlessCanceled(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized)
216public static bool ReportAndCatchUnlessCanceled(Exception exception, CancellationToken contextCancellationToken, ErrorSeverity severity = ErrorSeverity.Uncategorized)
237private static void Report(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized, bool forceDump = false)
248public static void ReportNonFatalError(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized, bool forceDump = false)
253private static void ReportException(Exception exception, ErrorSeverity severity, bool forceDump, ErrorReporterHandler? handler)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Helpers\MefHostServicesHelpers.cs (1)
51catch (Exception)
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (6)
267catch (Exception e) when (FatalError.ReportAndPropagateUnlessCanceled(e, cancellationToken, ErrorSeverity.Critical))
350catch (Exception e) when (FatalError.ReportAndPropagateUnlessCanceled(e, cancellationToken, ErrorSeverity.Critical))
395catch (Exception e) when (FatalError.ReportAndPropagateUnlessCanceled(e, cancellationToken, ErrorSeverity.Critical))
465catch (Exception e) when (FatalError.ReportAndPropagateUnlessCanceled(e, cancellationToken, ErrorSeverity.Critical))
980catch (Exception e) when (FatalError.ReportWithDumpAndCatch(e, ErrorSeverity.Critical))
1001public CompilationTrackerValidationException(string message, Exception inner) : base(message, inner) { }
Microsoft.CodeAnalysis.Workspaces.MSBuild (10)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (46)
src\Compilers\Core\Portable\InternalUtilities\FatalError.cs (14)
21public OperationCanceledIgnoringCallerTokenException(Exception innerException)
29public delegate void ErrorReporterHandler(Exception exception, ErrorSeverity severity, bool forceDump);
35private static Exception? s_reportedException;
43/// cref="ReportNonFatalError(Exception, ErrorSeverity, bool)"/></param>
99public static bool ReportAndPropagate(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized)
111public static bool ReportAndPropagateUnlessCanceled(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized)
140public static bool ReportAndPropagateUnlessCanceled(Exception exception, CancellationToken contextCancellationToken, ErrorSeverity severity = ErrorSeverity.Uncategorized)
161public static bool ReportAndCatch(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized)
173public static bool ReportWithDumpAndCatch(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized)
186public static bool ReportAndCatchUnlessCanceled(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized)
216public static bool ReportAndCatchUnlessCanceled(Exception exception, CancellationToken contextCancellationToken, ErrorSeverity severity = ErrorSeverity.Uncategorized)
237private static void Report(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized, bool forceDump = false)
248public static void ReportNonFatalError(Exception exception, ErrorSeverity severity = ErrorSeverity.Uncategorized, bool forceDump = false)
253private static void ReportException(Exception exception, ErrorSeverity severity, bool forceDump, ErrorReporterHandler? handler)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (4)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (4)
Microsoft.CodeAnalysis.Workspaces.UnitTests (4)
Microsoft.CommonLanguageServerProtocol.Framework.Package (8)
Microsoft.CommonLanguageServerProtocol.Framework.UnitTests (1)
Microsoft.CSharp (13)
Microsoft.Data.Analysis (3)
Microsoft.Data.Analysis.Tests (4)
Microsoft.DotNet.Arcade.Sdk (4)
Microsoft.DotNet.ArcadeLogging (1)
Microsoft.DotNet.Build.Tasks.Feed (15)
Microsoft.DotNet.Build.Tasks.Feed.Tests (6)
Microsoft.DotNet.Build.Tasks.Installers (5)
Microsoft.DotNet.Build.Tasks.Packaging (13)
Microsoft.DotNet.Build.Tasks.TargetFramework (1)
Microsoft.DotNet.Build.Tasks.VisualStudio (4)
Microsoft.DotNet.Build.Tasks.Workloads (8)
Microsoft.DotNet.Build.Tasks.Workloads.Tests (2)
Microsoft.DotNet.Deployment.Tasks.Links (5)
Microsoft.DotNet.GenAPI (1)
Microsoft.DotNet.GenFacades (4)
Microsoft.DotNet.Helix.Client (2)
Microsoft.DotNet.Helix.Sdk (17)
Microsoft.DotNet.Internal.SymbolHelper (6)
Microsoft.DotNet.MacOsPkg (3)
Microsoft.DotNet.NuGetRepack.Tasks (8)
Microsoft.DotNet.NuGetRepack.Tests (2)
Microsoft.DotNet.PackageTesting (2)
Microsoft.DotNet.RemoteExecutor (2)
Microsoft.DotNet.SharedFramework.Sdk (2)
Microsoft.DotNet.SignCheck (3)
Microsoft.DotNet.SignCheckLibrary (3)
Microsoft.DotNet.SignTool (12)
Microsoft.DotNet.SwaggerGenerator.MSBuild (1)
Microsoft.DotNet.Tar (1)
Microsoft.DotNet.VersionTools (4)
Microsoft.DotNet.VersionTools.Cli (2)
Microsoft.DotNet.XUnitAssert.Tests (539)
AsyncCollectionAssertsTests.cs (38)
39 var ex = Record.Exception(() => Assert.All(items, item => Assert.Equal(1, item)));
91 var ex = Record.Exception(() => Assert.All(items, x => Assert.Equal(1, x)));
137 var ex = Record.Exception(
170 var ex = Record.Exception(() =>
208 var ex = await Record.ExceptionAsync(
249 var ex = await Record.ExceptionAsync(() =>
307 var ex = Record.Exception(() => Assert.Contains(42, list));
376 var ex = Record.Exception(() => Assert.Contains(list, item => item.StartsWith("q")));
409 var ex = Record.Exception(() => Assert.Distinct(list));
425 var ex = Record.Exception(() => Assert.Distinct(list));
450 var ex = Record.Exception(() => Assert.Distinct(list, StringComparer.OrdinalIgnoreCase));
483 var ex = Record.Exception(() => Assert.DoesNotContain(42, list));
553 var ex = Record.Exception(() => Assert.DoesNotContain(list, item => item.StartsWith("w")));
594 var ex = Record.Exception(() => Assert.Empty(list));
639 var ex = Record.Exception(action);
661 var ex = Record.Exception(action);
767 var ex = Record.Exception(action);
791 var ex = Record.Exception(action);
872 var ex = Record.Exception(action);
924 var ex = Record.Exception(action);
964 var ex = Record.Exception(action);
1025 var ex = Record.Exception(action);
1053 var ex = Record.Exception(() => Assert.NotEmpty(list));
1093 var ex = Record.Exception(action);
1140 var ex = Record.Exception(action);
1190 var ex = Record.Exception(action);
1231 var ex = Record.Exception(action);
1273 var ex = Record.Exception(action);
1331 var ex = Record.Exception(action);
1358 var ex = Record.Exception(action);
1392 var ex = Record.Exception(() => Assert.Single(collection));
1413 var ex = Record.Exception(() => Assert.Single(collection));
1428 var ex = Record.Exception(() => Assert.Single(collection));
1453 var ex = Record.Exception(() => Assert.Single(collection));
1488 var ex = Record.Exception(() => Assert.Single(collection, item => false));
1504 var ex = Record.Exception(() => Assert.Single(collection, item => true));
1521 var ex = Record.Exception(() => Assert.Single(collection, item => item == 4));
1548 var ex = Record.Exception(() => Assert.Single(collection, c => c == 'Q'));
CollectionAssertsTests.cs (69)
37 var ex = Record.Exception(() => Assert.All(items, item => Assert.Equal(1, item)));
89 var ex = Record.Exception(() => Assert.All(items, x => Assert.Equal(1, x)));
135 var ex = Record.Exception(
169 var ex = Record.Exception(() =>
208 var ex = await Record.ExceptionAsync(
249 var ex = await Record.ExceptionAsync(() =>
307 var ex = Record.Exception(() => Assert.Contains(42, list));
369 var ex = Record.Exception(() => Assert.Contains("HI THERE", set, StringComparer.Ordinal));
410 var ex = Record.Exception(() => Assert.Contains(list, item => item.StartsWith("q")));
443 var ex = Record.Exception(() => Assert.Distinct(list));
459 var ex = Record.Exception(() => Assert.Distinct(list));
484 var ex = Record.Exception(() => Assert.Distinct(list, StringComparer.OrdinalIgnoreCase));
517 var ex = Record.Exception(() => Assert.DoesNotContain(42, list));
550 var ex = Record.Exception(() => Assert.DoesNotContain("HI THERE", set));
568 var ex = Record.Exception(() => Assert.DoesNotContain("HI THERE", set));
631 var ex = Record.Exception(() => Assert.DoesNotContain(list, item => item.StartsWith("w")));
672 var ex = Record.Exception(() => Assert.Empty(list));
712 var ex = Record.Exception(() => Assert.Equal(expected, actual));
729 var ex = Record.Exception(() => Assert.Equal(expected, actual));
801 var ex = Record.Exception(() => Assert.Equal(expected, actual));
869 var ex = Record.Exception(() => Assert.Equal(expected, actual));
878 var ex = Record.Exception(() => Assert.Equal(new object[] { 1, 2, 3 }, new object[] { 1, 2, 3L }));
1023 var ex = Record.Exception(() => Assert.Equal(expected, actual));
1038 var ex = Record.Exception(() => Assert.Equal(expected, actual, new IntComparer(false)));
1107 var ex = Record.Exception(() => Assert.Equal(new[] { 1, 2 }, new[] { 1, 3 }, new ThrowingComparer()));
1152 var ex = Record.Exception(() => Assert.Equal(expected, actual));
1182 var ex = Record.Exception(() => Assert.Equal(expected, actual, (x, y) => false));
1228 var ex = Record.Exception(() =>
1275 var ex = Record.Exception(() => Assert.Equal(expected, actual));
1292 var ex = Record.Exception(() => Assert.Equal(expected, actual));
1325 var ex = Record.Exception(() => Assert.Equal(expected, actual));
1369 var ex = Record.Exception(() => Assert.Equal(expected, actual));
1399 var ex = Record.Exception(() => Assert.Equal(expected, actual));
1481 var ex = Record.Exception(() => Assert.Equal(expected, actual));
1537 var ex = Record.Exception(() => Assert.Equal(expected, actual));
1555 var ex = Record.Exception(() => Assert.Equal(expected, actual));
1572 var ex = Record.Exception(() => Assert.Equal(expected, actual, new BitArrayComparer()));
1616 var ex = Record.Exception(() => Assert.NotEmpty(list));
1654 var ex = Record.Exception(() => Assert.NotEqual(expected, actual));
1691 var ex = Record.Exception(() => Assert.NotEqual(expected, actual));
1707 var ex = Record.Exception(() => Assert.NotEqual(expected, actual));
1741 var ex = Record.Exception(() => Assert.NotEqual(expected, actual));
1779 var ex = Record.Exception(() => Assert.NotEqual(expected, actual, new IntComparer(true)));
1807 var ex = Record.Exception(() => Assert.NotEqual(new[] { 1, 2 }, new[] { 1, 2 }, new ThrowingComparer()));
1843 var ex = Record.Exception(() => Assert.NotEqual(expected, actual));
1889 var ex = Record.Exception(() => Assert.NotEqual(expected, actual, (x, y) => true));
1903 var ex = Record.Exception(() =>
1932 var ex = Record.Exception(() => Assert.NotEqual(expected, actual));
1949 var ex = Record.Exception(() => Assert.NotEqual(expected, actual));
2018 var ex = Record.Exception(() => Assert.NotEqual(expected, actual));
2057 var ex = Record.Exception(() => Assert.NotEqual(expected, actual));
2115 var ex = Record.Exception(() => Assert.NotEqual(expected, actual));
2168 var ex = Record.Exception(() => Assert.NotEqual(expected, actual));
2190 var ex = Record.Exception(() => Assert.NotEqual(expected, actual));
2211 var ex = Record.Exception(() => Assert.NotEqual(expected, actual, new BitArrayComparer()));
2289 var ex = Record.Exception(() => Assert.Single(collection));
2310 var ex = Record.Exception(() => Assert.Single(collection));
2325 var ex = Record.Exception(() => Assert.Single(collection));
2365 var ex = Record.Exception(() => Assert.Single(collection, "foo"));
2381 var ex = Record.Exception(() => Assert.Single(collection, "Hello"));
2398 var ex = Record.Exception(() => Assert.Single(collection, 4));
2424 var ex = Record.Exception(() => Assert.Single(collection));
2445 var ex = Record.Exception(() => Assert.Single(collection));
2460 var ex = Record.Exception(() => Assert.Single(collection));
2485 var ex = Record.Exception(() => Assert.Single(collection));
2520 var ex = Record.Exception(() => Assert.Single(collection, item => false));
2536 var ex = Record.Exception(() => Assert.Single(collection, item => true));
2553 var ex = Record.Exception(() => Assert.Single(collection, item => item == 4));
2580 var ex = Record.Exception(() => Assert.Single(collection, c => c == 'Q'));
EqualityAssertsTests.cs (153)
26 var ex = Record.Exception(() => Assert.Equal(42, 2112));
40 var ex = Record.Exception(
78 var ex = Record.Exception(() => Assert.Equal(42, 42, new Comparer<int>(false)));
106 var ex = Record.Exception(() => Assert.Equal(42, 2112, new ThrowingIntComparer()));
129 var ex = Record.Exception(() => Assert.Equal(new[] { 1, 2 }, new[] { 1, 3 }, new ThrowingEnumerableComparer()));
167 var ex = Record.Exception(() => Assert.Equal(42, 42, (x, y) => false));
181 var ex = Record.Exception(() => Assert.Equal(42, 2112, (e, a) => throw new DivideByZeroException()));
196 var ex = Record.Exception(
233 var ex = Record.Exception(() => Assert.Equal(obj1, obj2));
263 var ex = Record.Exception(action);
297 var ex = Record.Exception(action);
328 var ex = Record.Exception(() => Assert.Equal(obj1, obj2));
354 var ex = Record.Exception(() => Assert.Equal<ComparableBaseClass>(expected, actual));
380 var ex = Record.Exception(() => Assert.Equal(expected, actual));
406 var ex = Record.Exception(() => Assert.Equal(expected, actual));
436 var ex = Record.Exception(action);
471 var ex = Record.Exception(() => Assert.Equal(expected, actual));
501 var ex = Record.Exception(() => Assert.Equal(expected, actual));
527 var ex = Record.Exception(() => Assert.Equal(expected, actual));
556 var ex = Record.Exception(() => Assert.Equal(nco1, nco2));
588 var ex = Record.Exception(() => Assert.Equal(obj1, obj2));
614 var ex = Record.Exception(() => Assert.Equal<EquatableBaseClass>(expected, actual));
640 var ex = Record.Exception(() => Assert.Equal(expected, actual));
666 var ex = Record.Exception(() => Assert.Equal(expected, actual));
696 var ex = Record.Exception(() => Assert.Equal(expected, actual));
726 var ex = Record.Exception(() => Assert.Equal(expected, actual));
763 var ex = Record.Exception(action);
798 var ex = Record.Exception(action);
822 var ex = Record.Exception(action);
859 var ex = Record.Exception(action);
891 var ex = Record.Exception(() => Assert.Equal(x, y));
922 var ex = Record.Exception(action);
954 var ex = Record.Exception(() => Assert.Equal(expected, actual));
986 var ex = Record.Exception(() => Assert.Equal(expected, (object)actual));
1005 var ex = Record.Exception(action);
1028 var ex = Record.Exception(() => Assert.Equal(expected, actual, new MyComparer()));
1042 var ex = Record.Exception(() => Assert.Equal(new UnsafeEnumerable(), new[] { 1, 2, 3 }, new MyComparer()));
1086 var ex = Record.Exception(() => Assert.Equal(expected, actual));
1140 var ex = Record.Exception(action);
1174 var ex = Record.Exception(action);
1204 var ex = Record.Exception(() => Assert.Equal(expected, actual));
1233 var ex = Record.Exception(() => Assert.Equal(expected, actual));
1259 var ex = Record.Exception(() => Assert.Equal(expected, actual));
1276 var ex = Record.Exception(() => Assert.Equal(expected, actual));
1293 var ex = Record.Exception(() => Assert.Equal(expected, actual));
1323 var ex = Record.Exception(() => Assert.Equal(expected, actual));
1345 var ex = Record.Exception(() => Assert.Equal(expected, actual, (string l, string r) => true));
1379 var ex = Record.Exception(action);
1418 var ex = Record.Exception(action);
1444 var ex = Record.Exception(action);
1483 var ex = Record.Exception(action);
1522 var ex = Record.Exception(action);
1551 var ex = Record.Exception(() => Assert.Equal(expected, actual, (string l, string r) => true));
1581 var ex = Record.Exception(() => Assert.Equal(expected, actual));
1609 var ex = Record.Exception(() => Assert.Equal(expected, actual));
1639 var ex = Record.Exception(() => Assert.Equal(expected, actual));
1669 var ex = Record.Exception(() => Assert.Equal(expected, actual));
1706 var ex = Record.Exception(() => Assert.Equal(expected, actual));
1743 var ex = Record.Exception(() => Assert.Equal(expected, actual));
1781 var ex = Record.Exception(() => Assert.Equal(date1, date2, precision));
1792 var ex2 = Record.Exception(() => Assert.Equal(date2, date1, precision));
1829 var ex = Record.Exception(() => Assert.Equal(expected, actual));
1862 var ex = Record.Exception(() => Assert.Equal(expected, actual));
1900 var ex = Record.Exception(() => Assert.Equal(date1, date2, precision));
1911 var ex2 = Record.Exception(() => Assert.Equal(date2, date1, precision));
1949 var ex = Record.Exception(() => Assert.Equal(date1, date2, precision));
1960 var ex2 = Record.Exception(() => Assert.Equal(date2, date1, precision));
1988 var ex = Record.Exception(() => Assert.Equal(0.11111M, 0.11444M, 3));
2017 var ex = Record.Exception(() => Assert.Equal(0.11111, 0.11444, 3));
2044 var ex = Record.Exception(() => Assert.Equal(0.11113, 0.11115, 4, MidpointRounding.ToEven));
2061 var ex = Record.Exception(() => Assert.Equal(0.0, 1.0, double.NegativeInfinity));
2081 var ex = Record.Exception(() => Assert.Equal(0.11113, 0.11115, 0.00001));
2105 var ex = Record.Exception(() => Assert.Equal(20210102.2208, double.NaN, 20000000.0));
2129 var ex = Record.Exception(() => Assert.Equal(double.PositiveInfinity, 77.7, 1.0));
2147 var ex = Record.Exception(() => Assert.Equal(0.0, double.NegativeInfinity, 1.0));
2177 var ex = Record.Exception(() => Assert.Equal(0.11111f, 0.11444f, 3));
2204 var ex = Record.Exception(() => Assert.Equal(0.111133f, 0.111155f, 4, MidpointRounding.ToEven));
2221 var ex = Record.Exception(() => Assert.Equal(0.0f, 1.0f, float.NegativeInfinity));
2241 var ex = Record.Exception(() => Assert.Equal(0.11113f, 0.11115f, 0.00001f));
2265 var ex = Record.Exception(() => Assert.Equal(20210102.2208f, float.NaN, 20000000.0f));
2289 var ex = Record.Exception(() => Assert.Equal(float.PositiveInfinity, 77.7f, 1.0f));
2307 var ex = Record.Exception(() => Assert.Equal(0.0f, float.NegativeInfinity, 1.0f));
2327 var ex = Record.Exception(() => Assert.NotEqual(42, 42));
2356 var ex = Record.Exception(() => Assert.NotEqual(42, 21, new Comparer<int>(true)));
2390 var ex = Record.Exception(() => Assert.NotEqual(42, 42, new ThrowingIntComparer()));
2413 var ex = Record.Exception(() => Assert.NotEqual(new[] { 1, 2 }, new[] { 1, 2 }, new ThrowingEnumerableComparer()));
2436 var ex = Record.Exception(() => Assert.NotEqual("42", "42", new ThrowingStringComparer()));
2468 var ex = Record.Exception(() => Assert.NotEqual(42, 21, (x, y) => true));
2488 var ex = Record.Exception(() => Assert.NotEqual(42, 42, (e, a) => throw new DivideByZeroException()));
2503 var ex = Record.Exception(
2524 var ex = Record.Exception(() => Assert.NotEqual("42", "42", (e, a) => throw new DivideByZeroException()));
2545 var ex = Record.Exception(() => Assert.NotEqual(obj1, obj2));
2574 var ex = Record.Exception(action);
2609 var ex = Record.Exception(action);
2640 var ex = Record.Exception(() => Assert.NotEqual(obj1, obj2));
2667 var ex = Record.Exception(() => Assert.NotEqual<ComparableBaseClass>(expected, actual));
2693 var ex = Record.Exception(() => Assert.NotEqual(expected, actual));
2719 var ex = Record.Exception(() => Assert.NotEqual(expected, actual));
2747 var ex = Record.Exception(action);
2784 var ex = Record.Exception(() => Assert.NotEqual(expected, actual));
2814 var ex = Record.Exception(() => Assert.NotEqual(expected, actual));
2840 var ex = Record.Exception(() => Assert.NotEqual(expected, actual));
2869 var ex = Record.Exception(() => Assert.NotEqual(nco1, nco2));
2898 var ex = Record.Exception(() => Assert.NotEqual(obj1, obj2));
2927 var ex = Record.Exception(() => Assert.NotEqual<EquatableBaseClass>(expected, actual));
2953 var ex = Record.Exception(() => Assert.NotEqual(expected, actual));
2979 var ex = Record.Exception(() => Assert.NotEqual(expected, actual));
3009 var ex = Record.Exception(() => Assert.NotEqual(expected, actual));
3039 var ex = Record.Exception(() => Assert.NotEqual(expected, actual));
3074 var ex = Record.Exception(action);
3109 var ex = Record.Exception(action);
3158 var ex = Record.Exception(action);
3189 var ex = Record.Exception(() => Assert.NotEqual(x, y));
3217 var ex = Record.Exception(action);
3248 var ex = Record.Exception(() => Assert.NotEqual(expected, actual));
3278 var ex = Record.Exception(() => Assert.NotEqual(expected, (object)actual));
3307 var ex = Record.Exception(() => Assert.NotEqual(expected, actual));
3358 var ex = Record.Exception(action);
3393 var ex = Record.Exception(action);
3424 var ex = Record.Exception(() => Assert.NotEqual(expected, actual));
3453 var ex = Record.Exception(() => Assert.NotEqual(expected, actual));
3479 var ex = Record.Exception(() => Assert.NotEqual(expected, actual));
3507 var ex = Record.Exception(action);
3544 var ex = Record.Exception(() => Assert.NotEqual(expected, actual, (string l, string r) => false));
3565 var ex = Record.Exception(action);
3604 var ex = Record.Exception(action);
3656 var ex = Record.Exception(action);
3695 var ex = Record.Exception(action);
3737 var ex = Record.Exception(() => Assert.NotEqual(expected, actual, (string l, string r) => false));
3753 var ex = Record.Exception(() => Assert.NotEqual("actual", "actual"));
3773 var ex = Record.Exception(
3799 var ex = Record.Exception(() => Assert.NotEqual(expected, actual));
3827 var ex = Record.Exception(() => Assert.NotEqual(expected, actual));
3858 var ex = Record.Exception(() => Assert.NotEqual(expected, actual));
3888 var ex = Record.Exception(() => Assert.NotEqual(expected, actual));
3925 var ex = Record.Exception(() => Assert.NotEqual(expected, actual));
3956 var ex = Record.Exception(() => Assert.NotEqual(0.11111M, 0.11444M, 2));
3985 var ex = Record.Exception(() => Assert.NotEqual(0.11111, 0.11444, 2));
4012 var ex = Record.Exception(() => Assert.NotEqual(10.565, 10.566, 2, MidpointRounding.AwayFromZero));
4035 var ex = Record.Exception(() => Assert.NotEqual(0.0, 1.0, double.NegativeInfinity));
4049 var ex = Record.Exception(() => Assert.NotEqual(10.566, 10.565, 0.01));
4073 var ex = Record.Exception(() => Assert.NotEqual(double.NaN, double.NaN, 1000.0));
4097 var ex = Record.Exception(() => Assert.NotEqual(double.MinValue, double.MaxValue, double.PositiveInfinity));
4133 var ex = Record.Exception(() => Assert.NotEqual(0.11111f, 0.11444f, 2));
4160 var ex = Record.Exception(() => Assert.NotEqual(10.5655f, 10.5666f, 2, MidpointRounding.AwayFromZero));
4183 var ex = Record.Exception(() => Assert.NotEqual(0.0f, 1.0f, float.NegativeInfinity));
4197 var ex = Record.Exception(() => Assert.NotEqual(10.569f, 10.562f, 0.01f));
4221 var ex = Record.Exception(() => Assert.NotEqual(float.NaN, float.NaN, 1000.0f));
4245 var ex = Record.Exception(() => Assert.NotEqual(float.MinValue, float.MaxValue, float.PositiveInfinity));
4275 var ex = Record.Exception(() => Assert.NotStrictEqual("actual", "actual"));
4301 var ex = Record.Exception(() => Assert.NotStrictEqual(new DerivedClass(), new BaseClass()));
4327 var ex = Record.Exception(() => Assert.StrictEqual("bob", "jim"));
4342 var ex = Record.Exception(() => Assert.StrictEqual(new EnumerableClass("ploeh"), new EnumerableClass("fnaah")));
EquivalenceAssertsTests.cs (69)
29 var ex = Record.Exception(() => Assert.Equivalent(expected, actual));
61 var ex = Record.Exception(() => Assert.Equivalent(12, 13));
89 var ex = Record.Exception(() => Assert.Equivalent(1m, 2m));
104 var ex = Record.Exception(() => Assert.Equivalent(1m, new object()));
133 var ex = Record.Exception(() => Assert.Equivalent(expected, actual));
162 var ex = Record.Exception(() => Assert.Equivalent(expected, actual));
185 var ex = Record.Exception(() => Assert.Equivalent("Hello, world", "Hello, world!"));
199 var ex = Record.Exception(() => Assert.Equivalent(null, string.Empty));
222 var ex = Record.Exception(() => Assert.Equivalent(new { x = 42 }, new { x = 2112 }));
245 var ex = Record.Exception(() => Assert.Equivalent(new { x = new { y = 42 } }, new { x = new { y = 2112 } }));
277 var ex = Record.Exception(() => Assert.Equivalent(new { x = 42, y = 2600 }, new { y = 2600, x = 2112 }));
300 var ex = Record.Exception(() => Assert.Equivalent(new { x = new { y = 2600 }, z = 42 }, new { z = 42, x = new { y = 2112 } }));
349 var ex = Record.Exception(() => Assert.Equivalent(expected, actual));
378 var ex = Record.Exception(() => Assert.Equivalent(expected, actual));
407 var ex = Record.Exception(() => Assert.Equivalent(expected, actual));
436 var ex = Record.Exception(() => Assert.Equivalent(expected, actual));
465 var ex = Record.Exception(() => Assert.Equivalent(expected, actual));
505 var ex = Record.Exception(
526 var ex = Record.Exception(
550 var ex = Record.Exception(
588 var ex = Record.Exception(() => Assert.Equivalent(new[] { 1, 6 }, new[] { 9, 4, 1 }, strict: false));
605 var ex = Record.Exception(() => Assert.Equivalent(expected, actual, strict: false));
637 var ex = Record.Exception(() => Assert.Equivalent(new[] { 1, 6 }, new[] { 9, 4, 1 }, strict: true));
651 var ex = Record.Exception(() => Assert.Equivalent(new[] { 1, 9, 4 }, new[] { 6, 9, 4, 1 }, strict: true));
668 var ex = Record.Exception(() => Assert.Equivalent(expected, actual));
685 var ex = Record.Exception(() => Assert.Equivalent(expected, actual, strict: true));
719 var ex = Record.Exception(() => Assert.Equivalent(new[] { 1, 6 }.ToImmutableArray(), new[] { 9, 4, 1 }.ToImmutableArray(), strict: false));
736 var ex = Record.Exception(() => Assert.Equivalent(expected, actual, strict: false));
768 var ex = Record.Exception(() => Assert.Equivalent(new[] { 1, 6 }.ToImmutableArray(), new[] { 9, 4, 1 }.ToImmutableArray(), strict: true));
782 var ex = Record.Exception(() => Assert.Equivalent(new[] { 1, 9, 4 }.ToImmutableArray(), new[] { 6, 9, 4, 1 }.ToImmutableArray(), strict: true));
799 var ex = Record.Exception(() => Assert.Equivalent(expected, actual));
816 var ex = Record.Exception(() => Assert.Equivalent(expected, actual, strict: true));
856 var ex = Record.Exception(() => Assert.Equivalent(expected, actual, strict: false));
873 var ex = Record.Exception(() => Assert.Equivalent(expected, actual, strict: false));
911 var ex = Record.Exception(() => Assert.Equivalent(expected, actual, strict: true));
928 var ex = Record.Exception(() => Assert.Equivalent(expected, actual, strict: true));
945 var ex = Record.Exception(() => Assert.Equivalent(expected, actual, strict: true));
962 var ex = Record.Exception(() => Assert.Equivalent(expected, actual, strict: true));
1000 var ex = Record.Exception(() => Assert.Equivalent(expected, actual, strict: false));
1017 var ex = Record.Exception(() => Assert.Equivalent(expected, actual, strict: false));
1055 var ex = Record.Exception(() => Assert.Equivalent(expected, actual, strict: true));
1072 var ex = Record.Exception(() => Assert.Equivalent(expected, actual, strict: true));
1089 var ex = Record.Exception(() => Assert.Equivalent(expected, actual, strict: true));
1106 var ex = Record.Exception(() => Assert.Equivalent(expected, actual, strict: true));
1197 var ex = Record.Exception(() => Assert.Equivalent(expected, actual, strict: false));
1214 var ex = Record.Exception(() => Assert.Equivalent(expected, actual, strict: false));
1231 var ex = Record.Exception(() => Assert.Equivalent(expected, actual, strict: false));
1248 var ex = Record.Exception(() => Assert.Equivalent(expected, actual, strict: false));
1286 var ex = Record.Exception(() => Assert.Equivalent(expected, actual, strict: true));
1303 var ex = Record.Exception(() => Assert.Equivalent(expected, actual, strict: true));
1320 var ex = Record.Exception(() => Assert.Equivalent(expected, actual, strict: true));
1337 var ex = Record.Exception(() => Assert.Equivalent(expected, actual, strict: true));
1366 var ex = Record.Exception(() => Assert.Equivalent(expected, actual, strict: false));
1383 var ex = Record.Exception(() => Assert.Equivalent(expected, actual, strict: false));
1412 var ex = Record.Exception(() => Assert.Equivalent(expected, actual, strict: true));
1429 var ex = Record.Exception(() => Assert.Equivalent(expected, actual, strict: true));
1460 var ex = Record.Exception(() => Assert.Equivalent(expected, actual));
1477 var ex = Record.Exception(() => Assert.Equivalent(expected, actual));
1515 var ex = Record.Exception(() => Assert.Equivalent(expected, actual));
1552 var ex = Record.Exception(() => Assert.Equivalent(expected, actual));
1574 var ex = Record.Exception(() => Assert.Equivalent(expected, actual));
1587 var ex = Record.Exception(() => Assert.Equivalent(expected, actual));
1605 var ex = Record.Exception(() => Assert.Equivalent(expected, actual));
1638 var ex = Record.Exception(() => Assert.Equivalent(expected, actual));
1650 var ex = Record.Exception(() => Assert.Equivalent(expected, actual));
1665 var ex = Record.Exception(() => Assert.Equivalent(expected, actual));
1697 var ex = Record.Exception(() => Assert.Equivalent(expected, actual));
1726 var ex = Record.Exception(() => Assert.Equivalent(expected, actual));
1755 var ex = Record.Exception(() => Assert.Equivalent(expected, actual));
ExceptionAssertsTests.cs (41)
19 Assert.Throws<ArgumentNullException>("testCode", () => Assert.Throws(typeof(Exception), default(Action)!));
27 var ex = Record.Exception(() => Assert.Throws(typeof(ArgumentException), testCode));
52 var ex = Record.Exception(() => Assert.Throws(typeof(ArgumentException), testCode));
70 var ex = Record.Exception(() => Assert.Throws(typeof(ArgumentException), testCode));
91 Assert.Throws<ArgumentNullException>("testCode", () => Assert.Throws(typeof(Exception), default(Func<object>)!));
99 var ex = Record.Exception(() => Assert.Throws(typeof(Exception), testCode));
110 var ex = Record.Exception(() => Assert.Throws(typeof(ArgumentException), testCode));
135 var ex = Record.Exception(() => Assert.Throws(typeof(ArgumentException), testCode));
153 var ex = Record.Exception(() => Assert.Throws(typeof(ArgumentException), testCode));
183 var ex = Record.Exception(() => Assert.Throws<ArgumentException>(testCode));
208 var ex = Record.Exception(() => Assert.Throws<ArgumentException>(testCode));
226 var ex = Record.Exception(() => Assert.Throws<ArgumentException>(testCode));
252 var ex = Record.Exception(() => Assert.Throws<Exception>(testCode));
263 var ex = Record.Exception(() => Assert.Throws<ArgumentException>(testCode));
288 var ex = Record.Exception(() => Assert.Throws<ArgumentException>(testCode));
306 var ex = Record.Exception(() => Assert.Throws<ArgumentException>(testCode));
335 var ex = Record.Exception(() => Assert.Throws<ArgumentException>("paramName", testCode));
359 var ex = Record.Exception(() => Assert.Throws<ArgumentException>("paramName2", testCode));
377 var ex = Record.Exception(() => Assert.Throws<ArgumentException>("paramName", testCode));
395 var ex = Record.Exception(() => Assert.Throws<ArgumentException>("paramName", testCode));
421 var ex = Record.Exception(() => Assert.Throws<ArgumentException>("paramName", testCode));
445 var ex = Record.Exception(() => Assert.Throws<ArgumentException>("paramName2", testCode));
463 var ex = Record.Exception(() => Assert.Throws<ArgumentException>("paramName", testCode));
481 var ex = Record.Exception(() => Assert.Throws<ArgumentException>("paramName", testCode));
510 var ex = Record.Exception(() => Assert.ThrowsAny<ArgumentException>(testCode));
535 var ex = Record.Exception(() => Assert.ThrowsAny<ArgumentException>(testCode));
569 var ex = Record.Exception(() => Assert.ThrowsAny<Exception>(testCode));
580 var ex = Record.Exception(() => Assert.ThrowsAny<ArgumentException>(testCode));
605 var ex = Record.Exception(() => Assert.ThrowsAny<ArgumentException>(testCode));
640 var ex = await Record.ExceptionAsync(() => Assert.ThrowsAnyAsync<ArgumentException>(testCode));
665 var ex = await Record.ExceptionAsync(() => Assert.ThrowsAnyAsync<ArgumentException>(testCode));
699 var ex = await Record.ExceptionAsync(() => Assert.ThrowsAsync<ArgumentException>(testCode));
724 var ex = await Record.ExceptionAsync(() => Assert.ThrowsAsync<ArgumentException>(testCode));
742 var ex = await Record.ExceptionAsync(() => Assert.ThrowsAsync<ArgumentException>(testCode));
768 var ex = await Record.ExceptionAsync(() => Assert.ThrowsAsync<ArgumentException>("paramName", testCode));
792 var ex = await Record.ExceptionAsync(() => Assert.ThrowsAsync<ArgumentException>("paramName2", testCode));
810 var ex = await Record.ExceptionAsync(() => Assert.ThrowsAsync<ArgumentException>("paramName", testCode));
828 var ex = await Record.ExceptionAsync(() => Assert.ThrowsAsync<ArgumentException>("paramName", testCode));
MemoryAssertsTests.cs (31)
30 var ex = Record.Exception(() => Assert.Contains("WORLD".AsMemory(), "Hello, world!".AsMemory()));
44 var ex = Record.Exception(() => Assert.Contains("WORLD".Memoryify(), "Hello, world!".Memoryify()));
70 var ex = Record.Exception(() => Assert.Contains("foo".AsMemory(), default(string).AsMemory()));
84 var ex = Record.Exception(() => Assert.Contains("foo".Memoryify(), default(string).Memoryify()));
98 var ex = Record.Exception(
144 var ex = Record.Exception(() => Assert.Contains(new int[] { 13, 14 }.AsMemory(), new int[] { 1, 2, 3, 4, 5, 6, 7 }.AsMemory()));
158 var ex = Record.Exception(() => Assert.Contains(new int[] { 13, 14 }.Memoryify(), new int[] { 1, 2, 3, 4, 5, 6, 7 }.Memoryify()));
172 var ex = Record.Exception(() => Assert.Contains(new int[] { 3, 4 }.Memoryify(), Memory<int>.Empty));
223 var ex = Record.Exception(() => Assert.DoesNotContain("WORLD".AsMemory(), "Hello, world!".AsMemory(), StringComparison.OrdinalIgnoreCase));
238 var ex = Record.Exception(() => Assert.DoesNotContain("WORLD".Memoryify(), "Hello, world!".Memoryify(), StringComparison.OrdinalIgnoreCase));
253 var ex = Record.Exception(() => Assert.DoesNotContain("world".AsMemory(), "Hello, world!".AsMemory()));
268 var ex = Record.Exception(() => Assert.DoesNotContain("world".Memoryify(), "Hello, world!".Memoryify()));
295 var ex = Record.Exception(() => Assert.DoesNotContain("world".Memoryify(), "Hello, world from a very long string that will end up being truncated".Memoryify()));
310 var ex = Record.Exception(() => Assert.DoesNotContain("world".Memoryify(), "This is a relatively long string that has 'Hello, world' placed in the middle so that we can dual trunaction".Memoryify()));
325 var ex = Record.Exception(() => Assert.DoesNotContain("world".Memoryify(), "This is a relatively long string that will from the front truncated, just to say 'Hello, world'".Memoryify()));
367 var ex = Record.Exception(() => Assert.DoesNotContain(new int[] { 3, 4 }.AsMemory(), new int[] { 1, 2, 3, 4, 5, 6, 7 }.AsMemory()));
382 var ex = Record.Exception(() => Assert.DoesNotContain(new int[] { 3, 4 }.Memoryify(), new int[] { 1, 2, 3, 4, 5, 6, 7 }.Memoryify()));
405 var ex = Record.Exception(() => Assert.DoesNotContain(Memory<int>.Empty, data.ToArray().Memoryify()));
435 var ex = Record.Exception(action);
457 var ex = Record.Exception(action);
488 var ex = Record.Exception(action);
511 var ex = Record.Exception(action);
639 var ex = Record.Exception(action);
659 var ex = Record.Exception(action);
736 var ex = Record.Exception(action);
760 var ex = Record.Exception(action);
816 var ex = Record.Exception(action);
852 var ex = Record.Exception(action);
874 var ex = Record.Exception(action);
905 var ex = Record.Exception(action);
928 var ex = Record.Exception(action);
RangeAssertsTests.cs (9)
17 var ex = Record.Exception(() => Assert.InRange(1.50, .75, 1.25));
37 var ex = Record.Exception(() => Assert.InRange(0, 1, 2));
51 var ex = Record.Exception(() => Assert.InRange(2, 0, 1));
71 var ex = Record.Exception(() => Assert.InRange("adam", "bob", "scott"));
104 var ex = Record.Exception(() => Assert.InRange(1.0, .75, 1.25, new DoubleComparer(1)));
127 var ex = Record.Exception(() => Assert.NotInRange(1.0, .75, 1.25));
147 var ex = Record.Exception(() => Assert.NotInRange(2, 1, 3));
167 var ex = Record.Exception(() => Assert.NotInRange("bob", "adam", "scott"));
184 var ex = Record.Exception(() => Assert.NotInRange(400.0, .75, 1.25, new DoubleComparer(-1)));
SpanAssertsTests.cs (31)
30 var ex = Record.Exception(() => Assert.Contains("WORLD".AsSpan(), "Hello, world!".AsSpan()));
44 var ex = Record.Exception(() => Assert.Contains("WORLD".Spanify(), "Hello, world!".Spanify()));
70 var ex = Record.Exception(() => Assert.Contains("foo".AsSpan(), default(string).AsSpan()));
84 var ex = Record.Exception(() => Assert.Contains("foo".Spanify(), default(string).Spanify()));
98 var ex = Record.Exception(
144 var ex = Record.Exception(() => Assert.Contains(new int[] { 13, 14 }.AsSpan(), new int[] { 1, 2, 3, 4, 5, 6, 7 }.AsSpan()));
158 var ex = Record.Exception(() => Assert.Contains(new int[] { 13, 14 }.Spanify(), new int[] { 1, 2, 3, 4, 5, 6, 7 }.Spanify()));
172 var ex = Record.Exception(() => Assert.Contains(new int[] { 3, 4 }.Spanify(), Span<int>.Empty));
223 var ex = Record.Exception(() => Assert.DoesNotContain("WORLD".AsSpan(), "Hello, world!".AsSpan(), StringComparison.OrdinalIgnoreCase));
238 var ex = Record.Exception(() => Assert.DoesNotContain("WORLD".Spanify(), "Hello, world!".Spanify(), StringComparison.OrdinalIgnoreCase));
253 var ex = Record.Exception(() => Assert.DoesNotContain("world".AsSpan(), "Hello, world!".AsSpan()));
268 var ex = Record.Exception(() => Assert.DoesNotContain("world".Spanify(), "Hello, world!".Spanify()));
295 var ex = Record.Exception(() => Assert.DoesNotContain("world".AsSpan(), "Hello, world from a very long string that will end up being truncated".AsSpan()));
310 var ex = Record.Exception(() => Assert.DoesNotContain("world".AsSpan(), "This is a relatively long string that has 'Hello, world' placed in the middle so that we can dual trunaction".AsSpan()));
325 var ex = Record.Exception(() => Assert.DoesNotContain("world".AsSpan(), "This is a relatively long string that will from the front truncated, just to say 'Hello, world'".AsSpan()));
367 var ex = Record.Exception(() => Assert.DoesNotContain(new int[] { 3, 4 }.AsSpan(), new int[] { 1, 2, 3, 4, 5, 6, 7 }.AsSpan()));
382 var ex = Record.Exception(() => Assert.DoesNotContain(new int[] { 3, 4 }.Spanify(), new int[] { 1, 2, 3, 4, 5, 6, 7 }.Spanify()));
405 var ex = Record.Exception(() => Assert.DoesNotContain(Span<int>.Empty, data.ToArray().Spanify()));
435 var ex = Record.Exception(action);
457 var ex = Record.Exception(action);
488 var ex = Record.Exception(action);
511 var ex = Record.Exception(action);
639 var ex = Record.Exception(action);
659 var ex = Record.Exception(action);
736 var ex = Record.Exception(action);
760 var ex = Record.Exception(action);
816 var ex = Record.Exception(action);
852 var ex = Record.Exception(action);
874 var ex = Record.Exception(action);
905 var ex = Record.Exception(action);
928 var ex = Record.Exception(action);
StringAssertsTests.cs (26)
31 var ex = Record.Exception(action);
60 var ex = Record.Exception(action);
87 var ex = Record.Exception(() => Assert.Contains("foo", default(string)));
106 var ex = Record.Exception(action);
186 var ex = Record.Exception(action);
222 var ex = Record.Exception(action);
252 var ex = Record.Exception(action);
282 var ex = Record.Exception(action);
312 var ex = Record.Exception(action);
355 var ex = Record.Exception(() => Assert.DoesNotMatch("ll", "Hello, world!"));
385 var ex = Record.Exception(() => Assert.DoesNotMatch(new Regex(@"ll"), "Hello, world!"));
415 var ex = Record.Exception(() => Assert.Empty("Foo"));
449 var ex = Record.Exception(action);
478 var ex = Record.Exception(action);
521 var ex = Record.Exception(() => Assert.EndsWith("foo", null));
540 var ex = Record.Exception(action);
679 var ex = Record.Exception(action);
709 var ex = Record.Exception(action);
753 var ex = Record.Exception(() => Assert.Matches(@"\d+", "Hello, world!"));
767 var ex = Record.Exception(() => Assert.Matches(@"\d+", null));
802 var ex = Record.Exception(() => Assert.Matches(new Regex(@"\d+"), "Hello, world!"));
816 var ex = Record.Exception(() => Assert.Matches(new Regex(@"\d+"), null));
851 var ex = Record.Exception(action);
880 var ex = Record.Exception(action);
923 var ex = Record.Exception(() => Assert.StartsWith(default(string), default(string)));
942 var ex = Record.Exception(action);
Microsoft.DotNet.XUnitExtensions (5)
Microsoft.Extensions.AI (25)
Microsoft.Extensions.AI.Abstractions (7)
Microsoft.Extensions.AI.Abstractions.Tests (5)
Microsoft.Extensions.AI.AzureAIInference (2)
Microsoft.Extensions.AI.Integration.Tests (2)
Microsoft.Extensions.AI.Ollama (2)
Microsoft.Extensions.AI.OpenAI (3)
Microsoft.Extensions.AI.Tests (1)
Microsoft.Extensions.AmbientMetadata.Application (2)
Microsoft.Extensions.AsyncState (2)
Microsoft.Extensions.AsyncState.Tests (4)
Microsoft.Extensions.Caching.Hybrid (14)
Microsoft.Extensions.Caching.Hybrid.Tests (5)
LogCollector.cs (4)
12private readonly List<(string categoryName, LogLevel logLevel, EventId eventId, Exception? exception, string message)> _items = [];
14public (string categoryName, LogLevel logLevel, EventId eventId, Exception? exception, string message)[] ToArray()
76void ILogger.Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Microsoft.Extensions.Caching.Memory (1)
Microsoft.Extensions.Caching.StackExchangeRedis (15)
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (1)
Microsoft.Extensions.Compliance.Abstractions (2)
Microsoft.Extensions.Compliance.Redaction (2)
Microsoft.Extensions.Compliance.Redaction.Tests (1)
Microsoft.Extensions.Compliance.Testing (2)
Microsoft.Extensions.Configuration.Binder (9)
ConfigurationBinder.cs (9)
343if (configValue != null && TryConvertValue(type, configValue, section?.Path, out object? convertedValue, out Exception? error))
572catch (Exception ex)
750catch (Exception ex)
789catch (Exception ex)
845catch (Exception ex)
916catch (Exception ex)
933string value, string? path, out object? result, out Exception? error)
959catch (Exception ex)
988TryConvertValue(type, value, path, out object? result, out Exception? error);
Microsoft.Extensions.Configuration.FileExtensions (2)
Microsoft.Extensions.Configuration.KeyPerFile.Tests (2)
Microsoft.Extensions.DependencyInjection (7)
Microsoft.Extensions.DependencyInjection.AutoActivation (2)
Microsoft.Extensions.Diagnostics.ExceptionSummarization (10)
Microsoft.Extensions.Diagnostics.HealthChecks (11)
DefaultHealthCheckService.cs (5)
136catch (Exception ex) when (ex as OperationCanceledException == null)
226private static partial void HealthCheckEndDegraded(ILogger logger, string HealthCheckName, HealthStatus HealthStatus, double ElapsedMilliseconds, string? HealthCheckDescription, Exception? exception);
229private static partial void HealthCheckEndUnhealthy(ILogger logger, string HealthCheckName, HealthStatus HealthStatus, double ElapsedMilliseconds, string? HealthCheckDescription, Exception? exception);
252private static partial void HealthCheckError(ILogger logger, string HealthCheckName, double ElapsedMilliseconds, Exception exception);
254public static void HealthCheckError(ILogger logger, HealthCheckRegistration registration, Exception exception, TimeSpan duration) =>
HealthCheckPublisherHostedService.cs (6)
167catch (Exception ex)
225catch (Exception ex)
255public static void HealthCheckPublisherProcessingEnd(ILogger logger, TimeSpan duration, Exception? exception = null) =>
259private static partial void HealthCheckPublisherProcessingEnd(ILogger logger, double ElapsedMilliseconds, Exception? exception = null);
270public static void HealthCheckPublisherError(ILogger logger, IHealthCheckPublisher publisher, TimeSpan duration, Exception exception) =>
275private static partial void HealthCheckPublisherError(ILogger logger, IHealthCheckPublisher HealthCheckPublisher, double ElapsedMilliseconds, Exception exception);
Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (8)
HealthCheckResult.cs (4)
24public HealthCheckResult(HealthStatus status, string? description = null, Exception? exception = null, IReadOnlyDictionary<string, object>? data = null)
45public Exception? Exception { get; }
70public static HealthCheckResult Degraded(string? description = null, Exception? exception = null, IReadOnlyDictionary<string, object>? data = null)
82public static HealthCheckResult Unhealthy(string? description = null, Exception? exception = null, IReadOnlyDictionary<string, object>? data = null)
HealthReportEntry.cs (4)
26public HealthReportEntry(HealthStatus status, string? description, TimeSpan duration, Exception? exception, IReadOnlyDictionary<string, object>? data)
41public HealthReportEntry(HealthStatus status, string? description, TimeSpan duration, Exception? exception, IReadOnlyDictionary<string, object>? data, IEnumerable<string>? tags = null)
67/// Gets an <see cref="System.Exception"/> representing the exception that was thrown when checking for status (if any).
69public Exception? Exception { get; }
Microsoft.Extensions.Diagnostics.HealthChecks.Common (2)
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (3)
Microsoft.Extensions.Diagnostics.Probes (3)
Microsoft.Extensions.Diagnostics.Probes.Tests (1)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (6)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (33)
Microsoft.Extensions.Diagnostics.Testing (6)
Microsoft.Extensions.FileProviders.Physical (4)
Microsoft.Extensions.Hosting (20)
Microsoft.Extensions.Hosting.Abstractions (1)
Microsoft.Extensions.Hosting.Testing (2)
Microsoft.Extensions.Hosting.Testing.Tests (10)
Microsoft.Extensions.Hosting.WindowsServices (2)
Microsoft.Extensions.Http (16)
DefaultHttpClientFactory.cs (6)
289catch (Exception ex)
326private static readonly Action<ILogger, int, Exception?> _cleanupCycleStart = LoggerMessage.Define<int>(
331private static readonly Action<ILogger, double, int, int, Exception?> _cleanupCycleEnd = LoggerMessage.Define<double, int, int>(
336private static readonly Action<ILogger, string, Exception> _cleanupItemFailed = LoggerMessage.Define<string>(
341private static readonly Action<ILogger, double, string, Exception?> _handlerExpired = LoggerMessage.Define<double, string>(
363public static void CleanupItemFailed(Lazy<ILogger> loggerLazy, string clientName, Exception exception)
Logging\LogHelper.cs (6)
41private static readonly Action<ILogger, HttpMethod, string?, Exception?> _requestStart = LoggerMessage.Define<HttpMethod, string?>(
47private static readonly Action<ILogger, double, int, Exception?> _requestEnd = LoggerMessage.Define<double, int>(
52private static readonly Action<ILogger, double, Exception?> _requestFailed = LoggerMessage.Define<double>(
59private static readonly Action<ILogger, HttpMethod, string?, Exception?> _requestPipelineStart = LoggerMessage.Define<HttpMethod, string?>(
64private static readonly Action<ILogger, double, int, Exception?> _requestPipelineEnd = LoggerMessage.Define<double, int>(
69private static readonly Action<ILogger, double, Exception?> _requestPipelineFailed = LoggerMessage.Define<double>(
Microsoft.Extensions.Http.Diagnostics (20)
Logging\Internal\Log.cs (8)
39private static readonly Func<LoggerMessageState, Exception?, string> _originalFormatValueFmtFunc = OriginalFormatValueFmt;
46public static void OutgoingRequestError(ILogger logger, LogRecord record, Exception exception)
54Exception exception,
62Exception exception,
70Exception? exception,
78Exception exception,
86ILogger logger, LogLevel level, int eventId, string eventName, LogRecord record, Exception? exception = null)
152private static string OriginalFormatValueFmt(LoggerMessageState request, Exception? _)
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (4)
Microsoft.Extensions.Http.Diagnostics.Tests (14)
Logging\HttpClientLoggerTest.cs (11)
153var exception = await Record.ExceptionAsync(act);
699enricher1.Verify(e => e.Enrich(It.IsAny<IEnrichmentTagCollector>(), It.IsAny<HttpRequestMessage>(), It.IsAny<HttpResponseMessage>(), It.IsAny<Exception>()), Times.Exactly(1));
700enricher2.Verify(e => e.Enrich(It.IsAny<IEnrichmentTagCollector>(), It.IsAny<HttpRequestMessage>(), It.IsAny<HttpResponseMessage>(), It.IsAny<Exception>()), Times.Exactly(1));
742enricher1.Verify(e => e.Enrich(It.IsAny<IEnrichmentTagCollector>(), It.IsAny<HttpRequestMessage>(), It.IsAny<HttpResponseMessage>(), It.IsAny<Exception>()), Times.Exactly(1));
743enricher2.Verify(e => e.Enrich(It.IsAny<IEnrichmentTagCollector>(), It.IsAny<HttpRequestMessage>(), It.IsAny<HttpResponseMessage>(), It.IsAny<Exception>()), Times.Exactly(1));
752.Setup(e => e.Enrich(It.IsAny<IEnrichmentTagCollector>(), It.IsAny<HttpRequestMessage>(), It.IsAny<HttpResponseMessage>(), It.IsAny<Exception>()))
785enricher1.Verify(e => e.Enrich(It.IsAny<IEnrichmentTagCollector>(), It.IsAny<HttpRequestMessage>(), It.IsAny<HttpResponseMessage>(), It.IsAny<Exception>()), Times.Exactly(1));
786enricher2.Verify(e => e.Enrich(It.IsAny<IEnrichmentTagCollector>(), It.IsAny<HttpRequestMessage>(), It.IsAny<HttpResponseMessage>(), It.IsAny<Exception>()), Times.Exactly(1));
795.Setup(e => e.Enrich(It.IsAny<IEnrichmentTagCollector>(), It.IsAny<HttpRequestMessage>(), It.IsAny<HttpResponseMessage>(), It.IsAny<Exception>()))
831enricher1.Verify(e => e.Enrich(It.IsAny<IEnrichmentTagCollector>(), It.IsAny<HttpRequestMessage>(), It.IsAny<HttpResponseMessage>(), It.IsAny<Exception>()), Times.Exactly(1));
832enricher2.Verify(e => e.Enrich(It.IsAny<IEnrichmentTagCollector>(), It.IsAny<HttpRequestMessage>(), It.IsAny<HttpResponseMessage>(), It.IsAny<Exception>()), Times.Exactly(1));
Microsoft.Extensions.Http.Polly.Tests (1)
Microsoft.Extensions.Http.Resilience (5)
Microsoft.Extensions.Http.Resilience.Tests (7)
Microsoft.Extensions.Logging (16)
Logger.cs (16)
27public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
35List<Exception>? exceptions = null;
52static void LoggerLog(LogLevel logLevel, EventId eventId, ILogger logger, Exception? exception, Func<TState, Exception?, string> formatter, ref List<Exception>? exceptions, in TState state)
58catch (Exception ex)
60exceptions ??= new List<Exception>();
74List<Exception>? exceptions = null;
97static bool LoggerIsEnabled(LogLevel logLevel, ILogger logger, ref List<Exception>? exceptions)
106catch (Exception ex)
108exceptions ??= new List<Exception>();
131List<Exception>? exceptions = null;
140catch (Exception ex)
142exceptions ??= new List<Exception>();
155private static void ThrowLoggingError(List<Exception> exceptions)
Microsoft.Extensions.Logging.Abstractions (56)
LoggerExtensions.cs (16)
13private static readonly Func<FormattedLogValues, Exception?, string> _messageFormatter = MessageFormatter;
30public static void LogDebug(this ILogger logger, EventId eventId, Exception? exception, string? message, params object?[] args)
64public static void LogDebug(this ILogger logger, Exception? exception, string? message, params object?[] args)
100public static void LogTrace(this ILogger logger, EventId eventId, Exception? exception, string? message, params object?[] args)
134public static void LogTrace(this ILogger logger, Exception? exception, string? message, params object?[] args)
170public static void LogInformation(this ILogger logger, EventId eventId, Exception? exception, string? message, params object?[] args)
204public static void LogInformation(this ILogger logger, Exception? exception, string? message, params object?[] args)
240public static void LogWarning(this ILogger logger, EventId eventId, Exception? exception, string? message, params object?[] args)
274public static void LogWarning(this ILogger logger, Exception? exception, string? message, params object?[] args)
310public static void LogError(this ILogger logger, EventId eventId, Exception? exception, string? message, params object?[] args)
344public static void LogError(this ILogger logger, Exception? exception, string? message, params object?[] args)
380public static void LogCritical(this ILogger logger, EventId eventId, Exception? exception, string? message, params object?[] args)
414public static void LogCritical(this ILogger logger, Exception? exception, string? message, params object?[] args)
468public static void Log(this ILogger logger, LogLevel logLevel, Exception? exception, string? message, params object?[] args)
482public static void Log(this ILogger logger, LogLevel logLevel, EventId eventId, Exception? exception, string? message, params object?[] args)
515private static string MessageFormatter(FormattedLogValues state, Exception? error)
LoggerMessage.cs (28)
130public static Action<ILogger, Exception?> Define(LogLevel logLevel, EventId eventId, string formatString)
141public static Action<ILogger, Exception?> Define(LogLevel logLevel, EventId eventId, string formatString, LogDefineOptions? options)
145void Log(ILogger logger, Exception? exception)
172public static Action<ILogger, T1, Exception?> Define<T1>(LogLevel logLevel, EventId eventId, string formatString)
184public static Action<ILogger, T1, Exception?> Define<T1>(LogLevel logLevel, EventId eventId, string formatString, LogDefineOptions? options)
188void Log(ILogger logger, T1 arg1, Exception? exception)
216public static Action<ILogger, T1, T2, Exception?> Define<T1, T2>(LogLevel logLevel, EventId eventId, string formatString)
229public static Action<ILogger, T1, T2, Exception?> Define<T1, T2>(LogLevel logLevel, EventId eventId, string formatString, LogDefineOptions? options)
233void Log(ILogger logger, T1 arg1, T2 arg2, Exception? exception)
262public static Action<ILogger, T1, T2, T3, Exception?> Define<T1, T2, T3>(LogLevel logLevel, EventId eventId, string formatString)
276public static Action<ILogger, T1, T2, T3, Exception?> Define<T1, T2, T3>(LogLevel logLevel, EventId eventId, string formatString, LogDefineOptions? options)
280void Log(ILogger logger, T1 arg1, T2 arg2, T3 arg3, Exception? exception)
310public static Action<ILogger, T1, T2, T3, T4, Exception?> Define<T1, T2, T3, T4>(LogLevel logLevel, EventId eventId, string formatString)
325public static Action<ILogger, T1, T2, T3, T4, Exception?> Define<T1, T2, T3, T4>(LogLevel logLevel, EventId eventId, string formatString, LogDefineOptions? options)
329void Log(ILogger logger, T1 arg1, T2 arg2, T3 arg3, T4 arg4, Exception? exception)
360public static Action<ILogger, T1, T2, T3, T4, T5, Exception?> Define<T1, T2, T3, T4, T5>(LogLevel logLevel, EventId eventId, string formatString)
376public static Action<ILogger, T1, T2, T3, T4, T5, Exception?> Define<T1, T2, T3, T4, T5>(LogLevel logLevel, EventId eventId, string formatString, LogDefineOptions? options)
380void Log(ILogger logger, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, Exception? exception)
412public static Action<ILogger, T1, T2, T3, T4, T5, T6, Exception?> Define<T1, T2, T3, T4, T5, T6>(LogLevel logLevel, EventId eventId, string formatString)
429public static Action<ILogger, T1, T2, T3, T4, T5, T6, Exception?> Define<T1, T2, T3, T4, T5, T6>(LogLevel logLevel, EventId eventId, string formatString, LogDefineOptions? options)
433void Log(ILogger logger, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, Exception? exception)
468public static readonly Func<LogValues, Exception?, string> Callback = (state, exception) => state.ToString();
506public static readonly Func<LogValues<T0>, Exception?, string> Callback = (state, exception) => state.ToString();
554public static readonly Func<LogValues<T0, T1>, Exception?, string> Callback = (state, exception) => state.ToString();
605public static readonly Func<LogValues<T0, T1, T2>, Exception?, string> Callback = (state, exception) => state.ToString();
660public static readonly Func<LogValues<T0, T1, T2, T3>, Exception?, string> Callback = (state, exception) => state.ToString();
721public static readonly Func<LogValues<T0, T1, T2, T3, T4>, Exception?, string> Callback = (state, exception) => state.ToString();
786public static readonly Func<LogValues<T0, T1, T2, T3, T4, T5>, Exception?, string> Callback = (state, exception) => state.ToString();
Microsoft.Extensions.Logging.AzureAppServices (4)
BatchingLogger.cs (4)
31public void Log<TState>(DateTimeOffset timestamp, LogLevel logLevel, EventId _, TState state, Exception exception, Func<TState, Exception, string> formatter)
70public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
Microsoft.Extensions.Logging.Console (4)
Microsoft.Extensions.Logging.Debug (2)
Microsoft.Extensions.Logging.EventLog (3)
Microsoft.Extensions.Logging.EventSource (4)
Microsoft.Extensions.Logging.TraceSource (2)
Microsoft.Extensions.ML (14)
ModelLoaders\FileModelLoader.cs (6)
89catch (Exception ex)
159private static readonly Action<ILogger, string, Exception> _fileLoadBegin = LoggerMessage.Define<string>(
164private static readonly Action<ILogger, string, double, Exception> _fileLoadEnd = LoggerMessage.Define<string, double>(
169private static readonly Action<ILogger, string, double, Exception> _fileReloadError = LoggerMessage.Define<string, double>(
174private static readonly Action<ILogger, string, double, Exception> _fileReLoad = LoggerMessage.Define<string, double>(
189public static void FileReloadError(ILogger logger, string filePath, TimeSpan duration, Exception exception)
ModelLoaders\UriModelLoader.cs (8)
95catch (Exception ex)
157catch (Exception ex)
193private static readonly Action<ILogger, Uri, Exception> _uriReloadBegin = LoggerMessage.Define<Uri>(
198private static readonly Action<ILogger, Uri, double, Exception> _uriReloadEnd = LoggerMessage.Define<Uri, double>(
203private static readonly Action<ILogger, Uri, double, Exception> _uriReloadError = LoggerMessage.Define<Uri, double>(
208private static readonly Action<ILogger, Uri, Exception> _uriLoadError = LoggerMessage.Define<Uri>(
223public static void UriReloadError(ILogger logger, Uri uri, TimeSpan duration, Exception exception)
228public static void UriLoadError(ILogger logger, Uri uri, Exception exception)
Microsoft.Extensions.ObjectPool.DependencyInjection (2)
Microsoft.Extensions.Options (1)
Microsoft.Extensions.Options.Contextual (5)
Microsoft.Extensions.Primitives (2)
Microsoft.Extensions.Resilience (3)
Microsoft.Extensions.Resilience.Tests (1)
Microsoft.Extensions.SecretManager.Tools.Tests (1)
Microsoft.Extensions.ServiceDiscovery (7)
Microsoft.Extensions.Telemetry (29)
Logging\ExtendedLogger.cs (23)
40public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
47ModernPath(logLevel, eventId, msgState, exception, (Func<LoggerMessageState, Exception?, string>)(object)formatter);
70List<Exception>? exceptions = null;
77catch (Exception ex)
95List<Exception>? exceptions = null;
109catch (Exception ex)
124private static void HandleExceptions(IEnumerable<Exception>? exceptions)
132private static void RecordException(Exception exception, EnrichmentTagCollector tags, LoggerConfig config)
147private static string GetExceptionStackTrace(Exception exception, LoggerConfig config)
165void HandleException(Exception exception, int indent)
196foreach (var ex in aggregateException.InnerExceptions)
208private void ModernPath(LogLevel logLevel, EventId eventId, LoggerMessageState msgState, Exception? exception, Func<LoggerMessageState, Exception?, string> formatter)
242List<Exception>? exceptions = null;
251catch (Exception ex)
277catch (Exception ex)
298private void LegacyPath<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
326List<Exception>? exceptions = null;
335catch (Exception ex)
357var fmt = (Func<TState, Exception?, string>)s.Formatter!;
361catch (Exception ex)
Microsoft.Extensions.Telemetry.Abstractions (2)
Microsoft.Extensions.Telemetry.PerformanceTests (6)
Microsoft.Extensions.Telemetry.Tests (13)
Logging\ExtendedLoggerFactoryTests.cs (5)
114.Throws<Exception>();
554public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
592public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Logging\ExtendedLoggerTests.cs (8)
412Exception ex;
415List<Exception> exceptions = [];
418throw new ArgumentNullException("EM1", (Exception?)null);
427throw new ArgumentOutOfRangeException("EM2", (Exception?)null);
825Exception? exception,
826Func<TState, Exception?, string> formatter)
889public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter) => _provider.State = state?.ToString();
Microsoft.Extensions.TimeProvider.Testing (2)
Microsoft.Gen.Logging.Generated.Tests (10)
Microsoft.Gen.MetadataExtractor (1)
Microsoft.Gen.MetricsReports (1)
Microsoft.JSInterop (11)
Microsoft.JSInterop.Tests (12)
Microsoft.JSInterop.WebAssembly (1)
Microsoft.Maui (23)
Microsoft.Maui.Controls (25)
Microsoft.Maui.Controls.Build.Tasks (12)
Microsoft.Maui.Controls.Compatibility (1)
Microsoft.Maui.Controls.Foldable (1)
Microsoft.Maui.Controls.SourceGen (5)
Microsoft.Maui.Controls.Xaml (36)
ApplyPropertiesVisitor.cs (20)
134 Exception xpe = null;
176 catch (Exception e)
198 Exception xpe = null;
279 catch (Exception e)
358 if (TrySetPropertyValue(xamlelement, propertyName, xKey, value, rootElement, lineInfo, serviceProvider, out var xpe))
368 public static bool TrySetPropertyValue(object element, XmlName propertyName, string xKey, object value, object rootElement, IXmlLineInfo lineInfo, IServiceProvider serviceProvider, out Exception xpe)
431 public static object GetPropertyValue(object xamlElement, XmlName propertyName, object rootElement, IXmlLineInfo lineInfo, out Exception xpe, out object targetProperty)
455 static bool TryConnectEvent(object element, string localName, bool attached, object value, object rootElement, IXmlLineInfo lineInfo, out Exception exception)
521 static bool TrySetDynamicResource(object element, BindableProperty property, object value, IXmlLineInfo lineInfo, out Exception exception)
542 static bool TrySetBinding(object element, BindableProperty property, string localName, object value, IXmlLineInfo lineInfo, out BindingBase binding, out Exception exception)
574 static bool TrySetValue(object element, BindableProperty property, bool attached, object value, IXmlLineInfo lineInfo, IServiceProvider serviceProvider, out Exception exception)
619 catch (Exception e)
637 static bool TryGetValue(object element, BindableProperty property, bool attached, out object value, IXmlLineInfo lineInfo, out Exception exception, out object targetProperty)
655 static bool TrySetProperty(object element, string localName, object value, IXmlLineInfo lineInfo, IServiceProvider serviceProvider, object rootElement, out Exception exception)
680 catch (Exception e)
687 static bool TryGetProperty(object element, string localName, out object value, IXmlLineInfo lineInfo, object rootElement, out Exception exception, out object targetProperty)
732 static bool TryAddToProperty(object element, XmlName propertyName, object value, string xKey, IXmlLineInfo lineInfo, IServiceProvider serviceProvider, object rootElement, out Exception exception)
755 catch (Exception e)
762 static bool TryAddToResourceDictionary(ResourceDictionary resourceDictionary, object value, string xKey, IXmlLineInfo lineInfo, out Exception exception)
802 static bool TryAddValue(BindableObject bindable, BindableProperty property, object value, IServiceProvider serviceProvider, out Exception exception)
Microsoft.Maui.Essentials (6)
Microsoft.Maui.Graphics (4)
Microsoft.Maui.Graphics.Skia (4)
Microsoft.Maui.Graphics.Text.Markdig (1)
Microsoft.Maui.Graphics.Win2D.WinUI.Desktop (2)
Microsoft.Maui.Maps (6)
Microsoft.Maui.Resizetizer (11)
Microsoft.ML.AutoML (33)
Microsoft.ML.AutoML.Interactive (1)
Microsoft.ML.AutoML.Samples (1)
Microsoft.ML.AutoML.Tests (5)
Microsoft.ML.CodeGenerator (2)
Microsoft.ML.Core (131)
Utilities\Contracts.cs (98)
39where TException : Exception;
89where TException : Exception
99/// <see cref="Exception.Data"/> to 1.
102where TException : Exception
112public static bool IsMarked(this Exception ex)
125where TException : Exception
147public static MessageSensitivity Sensitivity(this Exception ex)
189public TException Process<TException>(TException ex) where TException : Exception
255public static Exception Except()
257public static Exception Except(this IExceptionContext ctx)
259public static Exception Except(string msg)
261public static Exception Except(this IExceptionContext ctx, string msg)
263public static Exception Except(string msg, params object[] args)
265public static Exception Except(this IExceptionContext ctx, string msg, params object[] args)
267public static Exception Except(Exception inner, string msg)
269public static Exception Except(this IExceptionContext ctx, Exception inner, string msg)
271public static Exception Except(Exception inner, string msg, params object[] args)
273public static Exception Except(this IExceptionContext ctx, Exception inner, string msg, params object[] args)
281public static Exception ExceptUserArg(string name)
283public static Exception ExceptUserArg(this IExceptionContext ctx, string name)
285public static Exception ExceptUserArg(string name, string msg)
287public static Exception ExceptUserArg(this IExceptionContext ctx, string name, string msg)
289public static Exception ExceptUserArg(string name, string msg, params object[] args)
291public static Exception ExceptUserArg(this IExceptionContext ctx, string name, string msg, params object[] args)
297public static Exception ExceptParam(string paramName)
299public static Exception ExceptParam(this IExceptionContext ctx, string paramName)
301public static Exception ExceptParam(string paramName, string msg)
303public static Exception ExceptParam(this IExceptionContext ctx, string paramName, string msg)
305public static Exception ExceptParam(string paramName, string msg, params object[] args)
307public static Exception ExceptParam(this IExceptionContext ctx, string paramName, string msg, params object[] args)
309public static Exception ExceptParamValue<T>(T value, string paramName, string msg)
311public static Exception ExceptParamValue<T>(this IExceptionContext ctx, T value, string paramName, string msg)
313public static Exception ExceptParamValue<T>(T value, string paramName, string msg, params object[] args)
315public static Exception ExceptParamValue<T>(this IExceptionContext ctx, T value, string paramName, string msg, params object[] args)
321public static Exception ExceptValue(string paramName)
323public static Exception ExceptValue(this IExceptionContext ctx, string paramName)
325public static Exception ExceptValue(string paramName, string msg)
327public static Exception ExceptValue(this IExceptionContext ctx, string paramName, string msg)
329public static Exception ExceptValue(string paramName, string msg, params object[] args)
331public static Exception ExceptValue(this IExceptionContext ctx, string paramName, string msg, params object[] args)
339public static Exception ExceptEmpty(string paramName)
341public static Exception ExceptEmpty(this IExceptionContext ctx, string paramName)
343public static Exception ExceptEmpty(string paramName, string msg)
345public static Exception ExceptEmpty(this IExceptionContext ctx, string paramName, string msg)
347public static Exception ExceptEmpty(string paramName, string msg, params object[] args)
349public static Exception ExceptEmpty(this IExceptionContext ctx, string paramName, string msg, params object[] args)
355public static Exception ExceptWhiteSpace(string paramName)
357public static Exception ExceptWhiteSpace(this IExceptionContext ctx, string paramName)
359public static Exception ExceptWhiteSpace(string paramName, string msg)
361public static Exception ExceptWhiteSpace(this IExceptionContext ctx, string paramName, string msg)
369public static Exception ExceptDecode()
371public static Exception ExceptDecode(this IExceptionContext ctx)
373public static Exception ExceptDecode(string msg)
375public static Exception ExceptDecode(this IExceptionContext ctx, string msg)
377public static Exception ExceptDecode(string msg, params object[] args)
379public static Exception ExceptDecode(this IExceptionContext ctx, string msg, params object[] args)
381public static Exception ExceptDecode(Exception inner, string msg)
383public static Exception ExceptDecode(this IExceptionContext ctx, Exception inner, string msg)
385public static Exception ExceptDecode(Exception inner, string msg, params object[] args)
387public static Exception ExceptDecode(this IExceptionContext ctx, Exception inner, string msg, params object[] args)
393public static Exception ExceptIO()
395public static Exception ExceptIO(this IExceptionContext ctx)
397public static Exception ExceptIO(string msg)
399public static Exception ExceptIO(this IExceptionContext ctx, string msg)
401public static Exception ExceptIO(string msg, params object[] args)
403public static Exception ExceptIO(this IExceptionContext ctx, string msg, params object[] args)
405public static Exception ExceptIO(Exception inner, string msg)
407public static Exception ExceptIO(this IExceptionContext ctx, Exception inner, string msg)
409public static Exception ExceptIO(Exception inner, string msg, params object[] args)
411public static Exception ExceptIO(this IExceptionContext ctx, Exception inner, string msg, params object[] args)
417public static Exception ExceptNotImpl()
419public static Exception ExceptNotImpl(this IExceptionContext ctx)
421public static Exception ExceptNotImpl(string msg)
423public static Exception ExceptNotImpl(this IExceptionContext ctx, string msg)
425public static Exception ExceptNotImpl(string msg, params object[] args)
427public static Exception ExceptNotImpl(this IExceptionContext ctx, string msg, params object[] args)
433public static Exception ExceptNotSupp()
435public static Exception ExceptNotSupp(this IExceptionContext ctx)
437public static Exception ExceptNotSupp(string msg)
439public static Exception ExceptNotSupp(this IExceptionContext ctx, string msg)
441public static Exception ExceptNotSupp(string msg, params object[] args)
443public static Exception ExceptNotSupp(this IExceptionContext ctx, string msg, params object[] args)
449public static Exception ExceptSchemaMismatch(string paramName, string columnRole, string columnName)
451public static Exception ExceptSchemaMismatch(this IExceptionContext ctx, string paramName, string columnRole, string columnName)
453public static Exception ExceptSchemaMismatch(string paramName, string columnRole, string columnName, string expectedType, string actualType)
455public static Exception ExceptSchemaMismatch(this IExceptionContext ctx, string paramName, string columnRole, string columnName, string expectedType, string actualType)
Microsoft.ML.Core.Tests (13)
Microsoft.ML.CpuMath (97)
src\Microsoft.ML.Core\Utilities\Contracts.cs (97)
39where TException : Exception;
89where TException : Exception
99/// <see cref="Exception.Data"/> to 1.
102where TException : Exception
112public static bool IsMarked(this Exception ex)
125where TException : Exception
147public static MessageSensitivity Sensitivity(this Exception ex)
255public static Exception Except()
257public static Exception Except(this IExceptionContext ctx)
259public static Exception Except(string msg)
261public static Exception Except(this IExceptionContext ctx, string msg)
263public static Exception Except(string msg, params object[] args)
265public static Exception Except(this IExceptionContext ctx, string msg, params object[] args)
267public static Exception Except(Exception inner, string msg)
269public static Exception Except(this IExceptionContext ctx, Exception inner, string msg)
271public static Exception Except(Exception inner, string msg, params object[] args)
273public static Exception Except(this IExceptionContext ctx, Exception inner, string msg, params object[] args)
281public static Exception ExceptUserArg(string name)
283public static Exception ExceptUserArg(this IExceptionContext ctx, string name)
285public static Exception ExceptUserArg(string name, string msg)
287public static Exception ExceptUserArg(this IExceptionContext ctx, string name, string msg)
289public static Exception ExceptUserArg(string name, string msg, params object[] args)
291public static Exception ExceptUserArg(this IExceptionContext ctx, string name, string msg, params object[] args)
297public static Exception ExceptParam(string paramName)
299public static Exception ExceptParam(this IExceptionContext ctx, string paramName)
301public static Exception ExceptParam(string paramName, string msg)
303public static Exception ExceptParam(this IExceptionContext ctx, string paramName, string msg)
305public static Exception ExceptParam(string paramName, string msg, params object[] args)
307public static Exception ExceptParam(this IExceptionContext ctx, string paramName, string msg, params object[] args)
309public static Exception ExceptParamValue<T>(T value, string paramName, string msg)
311public static Exception ExceptParamValue<T>(this IExceptionContext ctx, T value, string paramName, string msg)
313public static Exception ExceptParamValue<T>(T value, string paramName, string msg, params object[] args)
315public static Exception ExceptParamValue<T>(this IExceptionContext ctx, T value, string paramName, string msg, params object[] args)
321public static Exception ExceptValue(string paramName)
323public static Exception ExceptValue(this IExceptionContext ctx, string paramName)
325public static Exception ExceptValue(string paramName, string msg)
327public static Exception ExceptValue(this IExceptionContext ctx, string paramName, string msg)
329public static Exception ExceptValue(string paramName, string msg, params object[] args)
331public static Exception ExceptValue(this IExceptionContext ctx, string paramName, string msg, params object[] args)
339public static Exception ExceptEmpty(string paramName)
341public static Exception ExceptEmpty(this IExceptionContext ctx, string paramName)
343public static Exception ExceptEmpty(string paramName, string msg)
345public static Exception ExceptEmpty(this IExceptionContext ctx, string paramName, string msg)
347public static Exception ExceptEmpty(string paramName, string msg, params object[] args)
349public static Exception ExceptEmpty(this IExceptionContext ctx, string paramName, string msg, params object[] args)
355public static Exception ExceptWhiteSpace(string paramName)
357public static Exception ExceptWhiteSpace(this IExceptionContext ctx, string paramName)
359public static Exception ExceptWhiteSpace(string paramName, string msg)
361public static Exception ExceptWhiteSpace(this IExceptionContext ctx, string paramName, string msg)
369public static Exception ExceptDecode()
371public static Exception ExceptDecode(this IExceptionContext ctx)
373public static Exception ExceptDecode(string msg)
375public static Exception ExceptDecode(this IExceptionContext ctx, string msg)
377public static Exception ExceptDecode(string msg, params object[] args)
379public static Exception ExceptDecode(this IExceptionContext ctx, string msg, params object[] args)
381public static Exception ExceptDecode(Exception inner, string msg)
383public static Exception ExceptDecode(this IExceptionContext ctx, Exception inner, string msg)
385public static Exception ExceptDecode(Exception inner, string msg, params object[] args)
387public static Exception ExceptDecode(this IExceptionContext ctx, Exception inner, string msg, params object[] args)
393public static Exception ExceptIO()
395public static Exception ExceptIO(this IExceptionContext ctx)
397public static Exception ExceptIO(string msg)
399public static Exception ExceptIO(this IExceptionContext ctx, string msg)
401public static Exception ExceptIO(string msg, params object[] args)
403public static Exception ExceptIO(this IExceptionContext ctx, string msg, params object[] args)
405public static Exception ExceptIO(Exception inner, string msg)
407public static Exception ExceptIO(this IExceptionContext ctx, Exception inner, string msg)
409public static Exception ExceptIO(Exception inner, string msg, params object[] args)
411public static Exception ExceptIO(this IExceptionContext ctx, Exception inner, string msg, params object[] args)
417public static Exception ExceptNotImpl()
419public static Exception ExceptNotImpl(this IExceptionContext ctx)
421public static Exception ExceptNotImpl(string msg)
423public static Exception ExceptNotImpl(this IExceptionContext ctx, string msg)
425public static Exception ExceptNotImpl(string msg, params object[] args)
427public static Exception ExceptNotImpl(this IExceptionContext ctx, string msg, params object[] args)
433public static Exception ExceptNotSupp()
435public static Exception ExceptNotSupp(this IExceptionContext ctx)
437public static Exception ExceptNotSupp(string msg)
439public static Exception ExceptNotSupp(this IExceptionContext ctx, string msg)
441public static Exception ExceptNotSupp(string msg, params object[] args)
443public static Exception ExceptNotSupp(this IExceptionContext ctx, string msg, params object[] args)
449public static Exception ExceptSchemaMismatch(string paramName, string columnRole, string columnName)
451public static Exception ExceptSchemaMismatch(this IExceptionContext ctx, string paramName, string columnRole, string columnName)
453public static Exception ExceptSchemaMismatch(string paramName, string columnRole, string columnName, string expectedType, string actualType)
455public static Exception ExceptSchemaMismatch(this IExceptionContext ctx, string paramName, string columnRole, string columnName, string expectedType, string actualType)
Microsoft.ML.Data (28)
Microsoft.ML.DataView (5)
Microsoft.ML.Ensemble (1)
Microsoft.ML.FastTree (1)
Microsoft.ML.IntegrationTests (1)
Microsoft.ML.Maml (12)
Microsoft.ML.Parquet (4)
Microsoft.ML.Predictor.Tests (2)
Microsoft.ML.ResultProcessor (1)
Microsoft.ML.Samples (1)
Microsoft.ML.SearchSpace (3)
Microsoft.ML.StandardTrainers (1)
Microsoft.ML.Sweeper (6)
Microsoft.ML.TensorFlow (7)
Microsoft.ML.TestFramework (3)
Microsoft.ML.Tests (15)
Microsoft.ML.Tokenizers (5)
Microsoft.ML.Tokenizers.Data.Tests (9)
src\Common\tests\RetryHelper.cs (8)
16private static readonly Predicate<Exception> _defaultRetryWhenFunc = p => true;
24public static void Execute(Action test, int maxAttempts = 5, Func<int, int>? backoffFunc = null, Predicate<Exception>? retryWhen = null, [CallerMemberName] string? testName = null)
39var exceptions = new List<Exception>();
42Exception lastException;
48catch (Exception e) when (retryWhen(e))
74public static async Task ExecuteAsync(Func<Task> test, int maxAttempts = 5, Func<int, int>? backoffFunc = null, Predicate<Exception>? retryWhen = null, [CallerMemberName] string? testName = null)
89var exceptions = new List<Exception>();
97catch (Exception e) when (retryWhen(e))
Microsoft.ML.Tokenizers.Tests (8)
src\Common\tests\RetryHelper.cs (8)
16private static readonly Predicate<Exception> _defaultRetryWhenFunc = p => true;
24public static void Execute(Action test, int maxAttempts = 5, Func<int, int>? backoffFunc = null, Predicate<Exception>? retryWhen = null, [CallerMemberName] string? testName = null)
39var exceptions = new List<Exception>();
42Exception lastException;
48catch (Exception e) when (retryWhen(e))
74public static async Task ExecuteAsync(Func<Task> test, int maxAttempts = 5, Func<int, int>? backoffFunc = null, Predicate<Exception>? retryWhen = null, [CallerMemberName] string? testName = null)
89var exceptions = new List<Exception>();
97catch (Exception e) when (retryWhen(e))
Microsoft.ML.Transforms (1)
Microsoft.ML.Vision (3)
Microsoft.Svcutil.NamedPipeMetadataImporter (3)
Microsoft.VisualBasic.Core (126)
Microsoft.VisualBasic.Tests (3)
Microsoft.VisualStudio.IntegrationTest.Setup (6)
Microsoft.VisualStudio.LanguageServices (79)
Microsoft.VisualStudio.LanguageServices.CSharp (3)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (8)
Microsoft.VisualStudio.LanguageServices.DevKit (1)
Microsoft.VisualStudio.LanguageServices.LiveShare (3)
Microsoft.VisualStudio.LanguageServices.Xaml (1)
MiddlewareAnalysisSample (1)
MSBuild (85)
ErrorUtilities.cs (8)
67internal static void ThrowInternalError(string message, Exception? innerException, params object?[]? args)
354internal static void ThrowArgument(Exception? innerException, string resourceName, params object?[]? args)
406internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName)
418internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0)
431internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0, object arg1)
444internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0, object arg1, object arg2)
457internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0, object arg1, object arg2, object arg3)
585throw new ArgumentNullException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword(resourceName, parameterName), (Exception?)null);
MSBuildTaskHost (85)
BuildExceptionSerializationHelper.cs (9)
14public TypeConstructionTuple(Type type, Func<string, Exception?, BuildExceptionBase> factory)
21public Func<string, Exception?, BuildExceptionBase> Factory { get; }
24private static Dictionary<string, Func<string, Exception?, BuildExceptionBase>>? s_exceptionFactories;
26private static readonly Func<string, Exception?, BuildExceptionBase> s_defaultFactory =
33type.IsSubclassOf(typeof(Exception)) &&
49var exceptionFactories = new Dictionary<string, Func<string, Exception?, BuildExceptionBase>>();
54Func<string, Exception?, BuildExceptionBase> exceptionFactory = typeConstructionTuple.Factory;
76internal static Func<string, Exception?, BuildExceptionBase> CreateExceptionFactory(string serializationType)
78Func<string, Exception?, BuildExceptionBase>? factory = null;
D\a\_work\1\s\bin\repo\msbuild\src\Shared\ErrorUtilities.cs\ErrorUtilities.cs (8)
67internal static void ThrowInternalError(string message, Exception? innerException, params object?[]? args)
354internal static void ThrowArgument(Exception? innerException, string resourceName, params object?[]? args)
406internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName)
418internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0)
431internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0, object arg1)
444internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0, object arg1, object arg2)
457internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0, object arg1, object arg2, object arg3)
585throw new ArgumentNullException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword(resourceName, parameterName), (Exception?)null);
mscorlib (1)
netstandard (1)
PresentationBuildTasks (39)
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\BamlMapTable.cs (1)
1065catch (Exception e)
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlParseException.cs (5)
63public XamlParseException(string message, Exception innerException)
105public XamlParseException(string message, int lineNumber, int linePosition, Exception innerException)
112internal XamlParseException(string message, int lineNumber, int linePosition, Uri baseUri, Exception innerException)
410Exception innerException,
518Exception innerException,
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlParser.cs (1)
188catch (Exception e)
PresentationCore (124)
PresentationCore.Tests (1)
PresentationFramework (368)
MS\Internal\WindowsRuntime\Generated\WinRT\ExceptionHelpers.cs (16)
64Exception ex = GetExceptionForHR(hr, useGlobalErrorState: true, out bool restoredExceptionFromGlobalState);
75public static Exception GetExceptionForHR(int hr) => GetExceptionForHR(hr, false, out _);
77private static Exception GetExceptionForHR(int hr, bool useGlobalErrorState, out bool restoredExceptionFromGlobalState)
87Exception ex;
114ex = ComWrappersSupport.FindObject<Exception>(languageException.ThisPtr);
164public static unsafe void SetErrorInfo(Exception ex)
203public static void ReportUnhandledError(Exception ex)
214public static int GetHRForException(Exception ex)
256this Exception ex,
280this Exception ex,
298public static Exception AttachRestrictedErrorInfo(Exception e)
353public static void SetHResult(this Exception ex, int value)
358internal static Exception GetExceptionForHR(this Exception innerException, int hresult, string messageResource)
360Exception e;
System\Windows\Documents\ITextView.cs (4)
595public BringPositionIntoViewCompletedEventArgs(ITextPointer position, bool succeeded, Exception error, bool cancelled, object userState)
623public BringPointIntoViewCompletedEventArgs(Point point, ITextPointer position, bool succeeded, Exception error, bool cancelled, object userState)
692public BringLineIntoViewCompletedEventArgs(ITextPointer position, double suggestedX, int count, ITextPointer newPosition, double newSuggestedX, int linesMoved, bool succeeded, Exception error, bool cancelled, object userState)
808public BringPageIntoViewCompletedEventArgs(ITextPointer position, Point suggestedOffset, int count, ITextPointer newPosition, Point newSuggestedOffset, int pagesMoved, bool succeeded, Exception error, bool cancelled, object userState)
System\Windows\Markup\XamlParseException.cs (6)
63public XamlParseException(string message, Exception innerException)
105public XamlParseException(string message, int lineNumber, int linePosition, Exception innerException)
112internal XamlParseException(string message, int lineNumber, int linePosition, Uri baseUri, Exception innerException)
410Exception innerException,
502internal static void ThrowException(ParserContext parserContext, int lineNumber, int linePosition, string message, Exception innerException)
518Exception innerException,
PresentationUI (11)
ReachFramework (36)
Replay (15)
Roslyn.Compilers.Extension (1)
Roslyn.Test.PdbUtilities (7)
Roslyn.VisualStudio.DiagnosticsWindow (1)
Roslyn.VisualStudio.Next.UnitTests (2)
RunTests (11)
ScenarioTests.Common.Tests (5)
Security.TransportSecurity.IntegrationTests (12)
SemanticSearch.BuildTask (6)
ServerComparison.TestSites (1)
Shared (2)
Shared.Tests (104)
Throw\DoubleTests.cs (17)
30var exception = Record.Exception(() => Throw.IfLessThan(0.0, 0.0, "paramName"));
49var exception = Record.Exception(() => Throw.IfGreaterThan(0.0, 0.0, "paramName"));
68var exception = Record.Exception(() => Throw.IfLessThanOrEqual(1.5, 0.0, "paramName"));
87var exception = Record.Exception(() => Throw.IfGreaterThanOrEqual(0.0, 1.3, "paramName"));
108var exception = Record.Exception(() => Throw.IfZero(notZero, "paramName"));
136var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfGreaterThan(Zero, -1));
137var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfGreaterThan(Zero, -1, nameof(Zero)));
147var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfGreaterThanOrEqual(Zero, -1));
148var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfGreaterThanOrEqual(Zero, -1, nameof(Zero)));
158var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfLessThan(Zero, 1));
159var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfLessThan(Zero, 1, nameof(Zero)));
169var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfLessThanOrEqual(Zero, 1));
170var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfLessThanOrEqual(Zero, 1, nameof(Zero)));
180var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfZero(Zero));
181var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfZero(Zero, nameof(Zero)));
191var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfOutOfRange(Zero, 1, 2));
192var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfOutOfRange(Zero, 1, 2, nameof(Zero)));
Throw\IntegerTests.cs (34)
26var exception = Record.Exception(() => Throw.IfLessThan(0, 0, "paramName"));
41var exception = Record.Exception(() => Throw.IfGreaterThan(0, 0, "paramName"));
56var exception = Record.Exception(() => Throw.IfLessThanOrEqual(1, 0, "paramName"));
71var exception = Record.Exception(() => Throw.IfGreaterThanOrEqual(0, 1, "paramName"));
86var exception = Record.Exception(() => Throw.IfZero(1, "paramName"));
110var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfGreaterThan(Zero, -1));
111var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfGreaterThan(Zero, -1, nameof(Zero)));
121var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfGreaterThanOrEqual(Zero, -1));
122var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfGreaterThanOrEqual(Zero, -1, nameof(Zero)));
132var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfLessThan(Zero, 1));
133var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfLessThan(Zero, 1, nameof(Zero)));
143var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfLessThanOrEqual(Zero, 1));
144var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfLessThanOrEqual(Zero, 1, nameof(Zero)));
154var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfZero(Zero));
155var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfZero(Zero, nameof(Zero)));
165var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfOutOfRange(Zero, 1, 2));
166var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfOutOfRange(Zero, 1, 2, nameof(Zero)));
186var exception = Record.Exception(() => Throw.IfLessThan(0U, 0U, "paramName"));
201var exception = Record.Exception(() => Throw.IfGreaterThan(0U, 0U, "paramName"));
216var exception = Record.Exception(() => Throw.IfLessThanOrEqual(1U, 0U, "paramName"));
231var exception = Record.Exception(() => Throw.IfGreaterThanOrEqual(0U, 1U, "paramName"));
246var exception = Record.Exception(() => Throw.IfZero(1U, "paramName"));
270var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfGreaterThan(One, 0U));
271var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfGreaterThan(One, 0U, nameof(One)));
281var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfGreaterThanOrEqual(One, 0U));
282var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfGreaterThanOrEqual(One, 0U, nameof(One)));
292var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfLessThan(Zero, 1U));
293var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfLessThan(Zero, 1U, nameof(Zero)));
303var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfLessThanOrEqual(Zero, 1U));
304var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfLessThanOrEqual(Zero, 1U, nameof(Zero)));
314var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfZero(Zero));
315var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfZero(Zero, nameof(Zero)));
325var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfOutOfRange(Zero, 1U, 2U));
326var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfOutOfRange(Zero, 1U, 2U, nameof(Zero)));
Throw\LongTests.cs (34)
26var exception = Record.Exception(() => Throw.IfLessThan(0L, 0L, "paramName"));
41var exception = Record.Exception(() => Throw.IfGreaterThan(0L, 0L, "paramName"));
56var exception = Record.Exception(() => Throw.IfLessThanOrEqual(1L, 0L, "paramName"));
71var exception = Record.Exception(() => Throw.IfGreaterThanOrEqual(0L, 1L, "paramName"));
86var exception = Record.Exception(() => Throw.IfZero(1L, "paramName"));
110var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfGreaterThan(Zero, -1));
111var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfGreaterThan(Zero, -1, nameof(Zero)));
121var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfGreaterThanOrEqual(Zero, -1));
122var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfGreaterThanOrEqual(Zero, -1, nameof(Zero)));
132var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfLessThan(Zero, 1));
133var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfLessThan(Zero, 1, nameof(Zero)));
143var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfLessThanOrEqual(Zero, 1));
144var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfLessThanOrEqual(Zero, 1, nameof(Zero)));
154var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfZero(Zero));
155var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfZero(Zero, nameof(Zero)));
165var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfOutOfRange(Zero, 1, 2));
166var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfOutOfRange(Zero, 1, 2, nameof(Zero)));
186var exception = Record.Exception(() => Throw.IfLessThan(0UL, 0UL, "paramName"));
201var exception = Record.Exception(() => Throw.IfGreaterThan(0UL, 0UL, "paramName"));
216var exception = Record.Exception(() => Throw.IfLessThanOrEqual(1UL, 0UL, "paramName"));
231var exception = Record.Exception(() => Throw.IfGreaterThanOrEqual(0UL, 1UL, "paramName"));
246var exception = Record.Exception(() => Throw.IfZero(1UL, "paramName"));
270var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfGreaterThan(One, 0UL));
271var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfGreaterThan(One, 0UL, nameof(One)));
281var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfGreaterThanOrEqual(One, 0UL));
282var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfGreaterThanOrEqual(One, 0UL, nameof(One)));
292var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfLessThan(Zero, 1UL));
293var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfLessThan(Zero, 1UL, nameof(Zero)));
303var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfLessThanOrEqual(Zero, 1UL));
304var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfLessThanOrEqual(Zero, 1UL, nameof(Zero)));
314var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfZero(Zero));
315var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfZero(Zero, nameof(Zero)));
325var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfOutOfRange(Zero, 1UL, 2UL));
326var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfOutOfRange(Zero, 1UL, 2UL, nameof(Zero)));
Throw\ThrowTest.cs (19)
29var innerException = new Exception();
52var innerException = new Exception();
146var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfNull(somethingThatIsNull));
147var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfNull(somethingThatIsNull, nameof(somethingThatIsNull)));
159var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfNullOrMemberNull(somethingThatIsNull, somethingNestedThatIsNull));
160var exceptionExplicitArgumentName = Record.Exception(
173var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfNullOrMemberNull(red, somethingNestedThatIsNull));
174var exceptionExplicitArgumentName = Record.Exception(
208var exception = Record.Exception(() => Throw.IfNullOrMemberNull(red, blue));
239var exception = Record.Exception(() => Throw.IfNullOrWhitespace("param", "paramName"));
261var exception = Record.Exception(() => Throw.IfNullOrEmpty("param", "paramName"));
270var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfNullOrWhitespace(somethingThatIsNull));
271var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfNullOrWhitespace(somethingThatIsNull, nameof(somethingThatIsNull)));
281var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfNullOrEmpty(somethingThatIsNull));
282var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfNullOrEmpty(somethingThatIsNull, nameof(somethingThatIsNull)));
302var exception = Record.Exception(() => Throw.IfBufferTooSmall(23, 23, "paramName"));
380var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfNullOrEmpty(listButActuallyNull!));
417var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfOutOfRange((Color)colorButNull!));
418var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfOutOfRange((Color)colorButNull!, nameof(colorButNull)));
SignalR.Client.FunctionalTestApp (1)
SignalRSamples (3)
Sockets.BindTests (5)
Sockets.FunctionalTests (14)
Stress.AppHost (1)
System.CodeDom (1)
System.ComponentModel.Annotations (3)
System.ComponentModel.Composition (84)
System\ComponentModel\Composition\CompositionError.cs (11)
18private readonly Exception? _exception;
32: this(CompositionErrorId.Unknown, message, (ICompositionElement?)null, (Exception?)null)
53: this(CompositionErrorId.Unknown, message, element, (Exception?)null)
72public CompositionError(string? message, Exception? exception)
98public CompositionError(string? message, ICompositionElement? element, Exception? exception)
103internal CompositionError(CompositionErrorId id, string? description, ICompositionElement? element, Exception? exception)
142public Exception? Exception
152internal Exception? InnerException
170return Create(id, (ICompositionElement?)null, (Exception?)null, format, parameters);
175return Create(id, element, (Exception?)null, format, parameters);
178internal static CompositionError Create(CompositionErrorId id, ICompositionElement? element, Exception? exception, string format, params object?[] parameters)
System\ComponentModel\Composition\CompositionException.cs (13)
30: this((string?)null, (Exception?)null, (IEnumerable<CompositionError>?)null)
41/// the <see cref="Exception.Message"/> property to its default value.
44: this(message, (Exception?)null, (IEnumerable<CompositionError>?)null)
56/// the <see cref="Exception.Message"/> property to its default value.
59/// The <see cref="Exception"/> that is the underlying cause of the
61/// the <see cref="Exception.InnerException"/> property to <see langword="null"/>.
63public CompositionException(string? message, Exception? innerException)
87: this((string?)null, (Exception?)null, errors)
91internal CompositionException(string? message, Exception? innerException, IEnumerable<CompositionError>? errors)
134public ReadOnlyCollection<Exception> RootCauses
138var errors = new List<Exception>();
156return errors.ToReadOnlyCollection<Exception>();
311private static void VisitException(Exception exception, VisitContext context)
System.ComponentModel.EventBasedAsync (5)
System.ComponentModel.Primitives (2)
System.ComponentModel.TypeConverter (14)
System.Composition.Runtime (1)
System.Configuration.ConfigurationManager (56)
System\Configuration\ConfigurationErrorsException.cs (5)
35public ConfigurationErrorsException(string message, Exception inner, string filename, int line)
50public ConfigurationErrorsException(string message, Exception inner) :
62public ConfigurationErrorsException(string message, Exception inner, XmlNode node) :
70public ConfigurationErrorsException(string message, Exception inner, XmlReader reader) :
78internal ConfigurationErrorsException(string message, Exception inner, IConfigErrorInfo errorInfo) :
System\Configuration\ConfigurationException.cs (3)
44public ConfigurationException(string message, Exception inner) : this(message, inner, null, 0) { }
52public ConfigurationException(string message, Exception inner, XmlNode node)
60public ConfigurationException(string message, Exception inner, string filename, int line) : base(message, inner)
System.Console (8)
System.Data.Common (515)
System\Data\Common\AdapterUtil.Common.cs (29)
25static partial void TraceException(string trace, Exception e)
34internal static void TraceExceptionForCapture(Exception e)
278internal static Exception WrongType(Type got, Type expected)
286internal static Exception CollectionUniqueValue(Type itemType, string propertyName, string? propertyValue)
354internal static Exception InvalidSourceColumn(string parameter)
358internal static Exception ColumnsAddNullAttempt(string parameter)
362internal static Exception ColumnsDataSetColumn(string cacheColumn)
366internal static Exception ColumnsIndexInt32(int index, IColumnMappingCollection collection)
370internal static Exception ColumnsIndexSource(string srcColumn)
374internal static Exception ColumnsIsNotParent(ICollection collection)
378internal static Exception ColumnsIsParent(ICollection collection)
382internal static Exception ColumnsUniqueSourceColumn(string? srcColumn)
386internal static Exception NotADataColumnMapping(object value)
394internal static Exception InvalidSourceTable(string parameter)
398internal static Exception TablesAddNullAttempt(string parameter)
402internal static Exception TablesDataSetTable(string cacheTable)
406internal static Exception TablesIndexInt32(int index, ITableMappingCollection collection)
410internal static Exception TablesIsNotParent(ICollection collection)
414internal static Exception TablesIsParent(ICollection collection)
418internal static Exception TablesSourceIndex(string srcTable)
422internal static Exception TablesUniqueSourceTable(string? srcTable)
426internal static Exception NotADataTableMapping(object value)
519internal static Exception FillSchemaRequiresSourceTableName(string parameter)
527internal static Exception InvalidMaxRecords(string parameter, int max)
531internal static Exception InvalidStartRecord(string parameter, int start)
535internal static Exception FillRequires(string parameter)
539internal static Exception FillRequiresSourceTableName(string parameter)
543internal static Exception FillChapterAutoIncrement()
575internal static Exception UpdateConcurrencyViolation(StatementType statementType, int affected, int expected, DataRow[] dataRows)
System\Data\DataException.cs (304)
31public DataException(string? s, Exception? innerException) : base(s ?? SR.DataSet_DefaultDataException, innerException) { }
54public ConstraintException(string? message, Exception? innerException) : base(message ?? SR.DataSet_DefaultConstraintException, innerException)
86public DeletedRowInaccessibleException(string? message, Exception? innerException) : base(message ?? SR.DataSet_DefaultDeletedRowInaccessibleException, innerException)
112public DuplicateNameException(string? message, Exception? innerException) : base(message ?? SR.DataSet_DefaultDuplicateNameException, innerException)
138public InRowChangingEventException(string? message, Exception? innerException) : base(message ?? SR.DataSet_DefaultInRowChangingEventException, innerException)
164public InvalidConstraintException(string? message, Exception? innerException) : base(message ?? SR.DataSet_DefaultInvalidConstraintException, innerException)
190public MissingPrimaryKeyException(string? message, Exception? innerException) : base(message ?? SR.DataSet_DefaultMissingPrimaryKeyException, innerException)
216public NoNullAllowedException(string? message, Exception? innerException) : base(message ?? SR.DataSet_DefaultNoNullAllowedException, innerException)
242public ReadOnlyException(string? message, Exception? innerException) : base(message ?? SR.DataSet_DefaultReadOnlyException, innerException)
268public RowNotInTableException(string? message, Exception? innerException) : base(message ?? SR.DataSet_DefaultRowNotInTableException, innerException)
294public VersionNotFoundException(string? message, Exception? innerException) : base(message ?? (SR.DataSet_DefaultVersionNotFoundException), innerException)
311private static void TraceException(string trace, Exception e)
320internal static Exception TraceExceptionAsReturnValue(Exception e)
326internal static Exception TraceExceptionForCapture(Exception e)
332internal static Exception TraceExceptionWithoutRethrow(Exception e)
338internal static Exception _Argument(string error) => TraceExceptionAsReturnValue(new ArgumentException(error));
339internal static Exception _Argument(string error, Exception? innerException) => TraceExceptionAsReturnValue(new ArgumentException(error, innerException));
340private static Exception _ArgumentNull(string paramName, string msg) => TraceExceptionAsReturnValue(new ArgumentNullException(paramName, msg));
341internal static Exception _ArgumentOutOfRange(string paramName, string msg) => TraceExceptionAsReturnValue(new ArgumentOutOfRangeException(paramName, msg));
342private static Exception _IndexOutOfRange(string error) => TraceExceptionAsReturnValue(new IndexOutOfRangeException(error));
343private static Exception _InvalidOperation(string error) => TraceExceptionAsReturnValue(new InvalidOperationException(error));
344private static Exception _InvalidEnumArgumentException(string error) => TraceExceptionAsReturnValue(new InvalidEnumArgumentException(error));
345private static Exception _InvalidEnumArgumentException<T>(T value) where T : Enum
352private static void ThrowDataException(string error, Exception? innerException)
357private static Exception _Data(string error) => TraceExceptionAsReturnValue(new DataException(error));
358private static Exception _Constraint(string error) => TraceExceptionAsReturnValue(new ConstraintException(error));
359private static Exception _InvalidConstraint(string error) => TraceExceptionAsReturnValue(new InvalidConstraintException(error));
360private static Exception _DeletedRowInaccessible(string error) => TraceExceptionAsReturnValue(new DeletedRowInaccessibleException(error));
361private static Exception _DuplicateName(string error) => TraceExceptionAsReturnValue(new DuplicateNameException(error));
362private static Exception _InRowChangingEvent(string error) => TraceExceptionAsReturnValue(new InRowChangingEventException(error));
363private static Exception _MissingPrimaryKey(string error) => TraceExceptionAsReturnValue(new MissingPrimaryKeyException(error));
364private static Exception _NoNullAllowed(string error) => TraceExceptionAsReturnValue(new NoNullAllowedException(error));
366private static Exception _ReadOnly(string error) => TraceExceptionAsReturnValue(new ReadOnlyException(error));
367private static Exception _RowNotInTable(string error) => TraceExceptionAsReturnValue(new RowNotInTableException(error));
368private static Exception _VersionNotFound(string error) => TraceExceptionAsReturnValue(new VersionNotFoundException(error));
370public static Exception ArgumentNull(string paramName) => _ArgumentNull(paramName, SR.Format(SR.Data_ArgumentNull, paramName));
371public static Exception ArgumentOutOfRange(string paramName) => _ArgumentOutOfRange(paramName, SR.Format(SR.Data_ArgumentOutOfRange, paramName));
372public static Exception BadObjectPropertyAccess(string error) => _InvalidOperation(SR.Format(SR.DataConstraint_BadObjectPropertyAccess, error));
373public static Exception ArgumentContainsNull(string paramName) => TraceExceptionAsReturnValue(new ArgumentException(SR.Data_ArgumentContainsNull, paramName));
374public static Exception TypeNotAllowed(Type type) => _InvalidOperation(SR.Format(SR.Data_TypeNotAllowed, type.AssemblyQualifiedName));
380public static Exception NotSupportedOnDataSourceBatch() => Common.ADP.NotSupported(SR.Batch_NotSupportedOnDataSourceBatch);
386public static Exception NotSupportedOnDataSourceCommand() => Common.ADP.NotSupported(SR.Command_NotSupportedOnDataSourceCommand);
392public static Exception CannotModifyCollection() => _Argument(SR.Data_CannotModifyCollection);
393public static Exception CaseInsensitiveNameConflict(string? name) => _Argument(SR.Format(SR.Data_CaseInsensitiveNameConflict, name));
394public static Exception NamespaceNameConflict(string? name) => _Argument(SR.Format(SR.Data_NamespaceNameConflict, name));
395public static Exception InvalidOffsetLength() => _Argument(SR.Data_InvalidOffsetLength);
401public static Exception ColumnNotInTheTable(string column, string table) => _Argument(SR.Format(SR.DataColumn_NotInTheTable, column, table));
402public static Exception ColumnNotInAnyTable() => _Argument(SR.DataColumn_NotInAnyTable);
403public static Exception ColumnOutOfRange(int index) => _IndexOutOfRange(SR.Format(SR.DataColumns_OutOfRange, (index).ToString(CultureInfo.InvariantCulture)));
404public static Exception ColumnOutOfRange(string column) => _IndexOutOfRange(SR.Format(SR.DataColumns_OutOfRange, column));
405public static Exception CannotAddColumn1(string column) => _Argument(SR.Format(SR.DataColumns_Add1, column));
406public static Exception CannotAddColumn2(string column) => _Argument(SR.Format(SR.DataColumns_Add2, column));
407public static Exception CannotAddColumn3() => _Argument(SR.DataColumns_Add3);
408public static Exception CannotAddColumn4(string column) => _Argument(SR.Format(SR.DataColumns_Add4, column));
409public static Exception CannotAddDuplicate(string column) => _DuplicateName(SR.Format(SR.DataColumns_AddDuplicate, column));
410public static Exception CannotAddDuplicate2(string table) => _DuplicateName(SR.Format(SR.DataColumns_AddDuplicate2, table));
411public static Exception CannotAddDuplicate3(string table) => _DuplicateName(SR.Format(SR.DataColumns_AddDuplicate3, table));
412public static Exception CannotRemoveColumn() => _Argument(SR.DataColumns_Remove);
413public static Exception CannotRemovePrimaryKey() => _Argument(SR.DataColumns_RemovePrimaryKey);
414public static Exception CannotRemoveChildKey(string relation) => _Argument(SR.Format(SR.DataColumns_RemoveChildKey, relation));
415public static Exception CannotRemoveConstraint(string constraint, string table) => _Argument(SR.Format(SR.DataColumns_RemoveConstraint, constraint, table));
416public static Exception CannotRemoveExpression(string column, string expression) => _Argument(SR.Format(SR.DataColumns_RemoveExpression, column, expression));
417public static Exception ColumnNotInTheUnderlyingTable(string column, string table) => _Argument(SR.Format(SR.DataColumn_NotInTheUnderlyingTable, column, table));
418public static Exception InvalidOrdinal(string name, int ordinal) => _ArgumentOutOfRange(name, SR.Format(SR.DataColumn_OrdinalExceedMaximum, (ordinal).ToString(CultureInfo.InvariantCulture)));
424public static Exception AddPrimaryKeyConstraint() => _Argument(SR.DataConstraint_AddPrimaryKeyConstraint);
425public static Exception NoConstraintName() => _Argument(SR.DataConstraint_NoName);
426public static Exception ConstraintViolation(string constraint) => _Constraint(SR.Format(SR.DataConstraint_Violation, constraint));
427public static Exception ConstraintNotInTheTable(string constraint) => _Argument(SR.Format(SR.DataConstraint_NotInTheTable, constraint));
456public static Exception ConstraintViolation(DataColumn[] columns, object[] values) => _Constraint(UniqueConstraintViolationText(columns, values));
457public static Exception ConstraintOutOfRange(int index) => _IndexOutOfRange(SR.Format(SR.DataConstraint_OutOfRange, (index).ToString(CultureInfo.InvariantCulture)));
458public static Exception DuplicateConstraint(string constraint) => _Data(SR.Format(SR.DataConstraint_Duplicate, constraint));
459public static Exception DuplicateConstraintName(string constraint) => _DuplicateName(SR.Format(SR.DataConstraint_DuplicateName, constraint));
460public static Exception NeededForForeignKeyConstraint(UniqueConstraint key, ForeignKeyConstraint fk) => _Argument(SR.Format(SR.DataConstraint_NeededForForeignKeyConstraint, key.ConstraintName, fk.ConstraintName));
461public static Exception UniqueConstraintViolation() => _Argument(SR.DataConstraint_UniqueViolation);
462public static Exception ConstraintForeignTable() => _Argument(SR.DataConstraint_ForeignTable);
463public static Exception ConstraintParentValues() => _Argument(SR.DataConstraint_ParentValues);
464public static Exception ConstraintAddFailed(DataTable table) => _InvalidConstraint(SR.Format(SR.DataConstraint_AddFailed, table.TableName));
465public static Exception ConstraintRemoveFailed() => _Argument(SR.DataConstraint_RemoveFailed);
466public static Exception FailedCascadeDelete(string constraint) => _InvalidConstraint(SR.Format(SR.DataConstraint_CascadeDelete, constraint));
467public static Exception FailedCascadeUpdate(string constraint) => _InvalidConstraint(SR.Format(SR.DataConstraint_CascadeUpdate, constraint));
468public static Exception FailedClearParentTable(string table, string constraint, string childTable) => _InvalidConstraint(SR.Format(SR.DataConstraint_ClearParentTable, table, constraint, childTable));
469public static Exception ForeignKeyViolation(string constraint, object[] keys) => _InvalidConstraint(SR.Format(SR.DataConstraint_ForeignKeyViolation, constraint, KeysToString(keys)));
470public static Exception RemoveParentRow(ForeignKeyConstraint constraint) => _InvalidConstraint(SR.Format(SR.DataConstraint_RemoveParentRow, constraint.ConstraintName));
473public static Exception CantAddConstraintToMultipleNestedTable(string tableName) => _Argument(SR.Format(SR.DataConstraint_CantAddConstraintToMultipleNestedTable, tableName));
479public static Exception AutoIncrementAndExpression() => _Argument(SR.DataColumn_AutoIncrementAndExpression);
480public static Exception AutoIncrementAndDefaultValue() => _Argument(SR.DataColumn_AutoIncrementAndDefaultValue);
481public static Exception AutoIncrementSeed() => _Argument(SR.DataColumn_AutoIncrementSeed);
482public static Exception CantChangeDataType() => _Argument(SR.DataColumn_ChangeDataType);
483public static Exception NullDataType() => _Argument(SR.DataColumn_NullDataType);
484public static Exception ColumnNameRequired() => _Argument(SR.DataColumn_NameRequired);
485public static Exception DefaultValueAndAutoIncrement() => _Argument(SR.DataColumn_DefaultValueAndAutoIncrement);
486public static Exception DefaultValueDataType(string column, Type defaultType, Type columnType, Exception inner) =>
491public static Exception DefaultValueColumnDataType(string column, Type defaultType, Type columnType, Exception inner) => _Argument(SR.Format(SR.DataColumn_DefaultValueColumnDataType, column, defaultType.FullName, columnType.FullName), inner);
492public static Exception ExpressionAndUnique() => _Argument(SR.DataColumn_ExpressionAndUnique);
493public static Exception ExpressionAndReadOnly() => _Argument(SR.DataColumn_ExpressionAndReadOnly);
494public static Exception ExpressionAndConstraint(DataColumn column, Constraint constraint) => _Argument(SR.Format(SR.DataColumn_ExpressionAndConstraint, column.ColumnName, constraint.ConstraintName));
495public static Exception ExpressionInConstraint(DataColumn column) => _Argument(SR.Format(SR.DataColumn_ExpressionInConstraint, column.ColumnName));
496public static Exception ExpressionCircular() => _Argument(SR.DataColumn_ExpressionCircular);
497public static Exception NonUniqueValues(string column) => _InvalidConstraint(SR.Format(SR.DataColumn_NonUniqueValues, column));
498public static Exception NullKeyValues(string column) => _Data(SR.Format(SR.DataColumn_NullKeyValues, column));
499public static Exception NullValues(string column) => _NoNullAllowed(SR.Format(SR.DataColumn_NullValues, column));
500public static Exception ReadOnlyAndExpression() => _ReadOnly(SR.DataColumn_ReadOnlyAndExpression);
501public static Exception ReadOnly(string column) => _ReadOnly(SR.Format(SR.DataColumn_ReadOnly, column));
502public static Exception UniqueAndExpression() => _Argument(SR.DataColumn_UniqueAndExpression);
503public static Exception SetFailed(object? value, DataColumn column, Type type, Exception innerException) => _Argument(innerException.Message + SR.Format(SR.DataColumn_SetFailed, value?.ToString(), column.ColumnName, type.Name), innerException);
504public static Exception CannotSetToNull(DataColumn column) => _Argument(SR.Format(SR.DataColumn_CannotSetToNull, column.ColumnName));
505public static Exception LongerThanMaxLength(DataColumn column) => _Argument(SR.Format(SR.DataColumn_LongerThanMaxLength, column.ColumnName));
506public static Exception CannotSetMaxLength(DataColumn column, int value) => _Argument(SR.Format(SR.DataColumn_CannotSetMaxLength, column.ColumnName, value.ToString(CultureInfo.InvariantCulture)));
507public static Exception CannotSetMaxLength2(DataColumn column) => _Argument(SR.Format(SR.DataColumn_CannotSetMaxLength2, column.ColumnName));
508public static Exception CannotSetSimpleContentType(string columnName, Type type) => _Argument(SR.Format(SR.DataColumn_CannotSimpleContentType, columnName, type));
509public static Exception CannotSetSimpleContent(string columnName, Type type) => _Argument(SR.Format(SR.DataColumn_CannotSimpleContent, columnName, type));
510public static Exception CannotChangeNamespace(string columnName) => _Argument(SR.Format(SR.DataColumn_CannotChangeNamespace, columnName));
511public static Exception HasToBeStringType(DataColumn column) => _Argument(SR.Format(SR.DataColumn_HasToBeStringType, column.ColumnName));
512public static Exception AutoIncrementCannotSetIfHasData(string typeName) => _Argument(SR.Format(SR.DataColumn_AutoIncrementCannotSetIfHasData, typeName));
513public static Exception INullableUDTwithoutStaticNull(string typeName) => _Argument(SR.Format(SR.DataColumn_INullableUDTwithoutStaticNull, typeName));
514public static Exception IComparableNotImplemented(string typeName) => _Data(SR.Format(SR.DataStorage_IComparableNotDefined, typeName));
515public static Exception UDTImplementsIChangeTrackingButnotIRevertible(string typeName) => _InvalidOperation(SR.Format(SR.DataColumn_UDTImplementsIChangeTrackingButnotIRevertible, typeName));
516public static Exception SetAddedAndModifiedCalledOnnonUnchanged() => _InvalidOperation(SR.DataColumn_SetAddedAndModifiedCalledOnNonUnchanged);
517public static Exception InvalidDataColumnMapping(Type type) => _Argument(SR.Format(SR.DataColumn_InvalidDataColumnMapping, type.AssemblyQualifiedName));
518public static Exception CannotSetDateTimeModeForNonDateTimeColumns() => _InvalidOperation(SR.DataColumn_CannotSetDateTimeModeForNonDateTimeColumns);
519public static Exception InvalidDateTimeMode(DataSetDateTime mode) => _InvalidEnumArgumentException(mode);
520public static Exception CantChangeDateTimeMode(DataSetDateTime oldValue, DataSetDateTime newValue) => _InvalidOperation(SR.Format(SR.DataColumn_DateTimeMode, oldValue.ToString(), newValue.ToString()));
521public static Exception ColumnTypeNotSupported() => Common.ADP.NotSupported(SR.DataColumn_NullableTypesNotSupported);
527public static Exception SetFailed(string name) => _Data(SR.Format(SR.DataView_SetFailed, name));
528public static Exception SetDataSetFailed() => _Data(SR.DataView_SetDataSetFailed);
529public static Exception SetRowStateFilter() => _Data(SR.DataView_SetRowStateFilter);
530public static Exception CanNotSetDataSet() => _Data(SR.DataView_CanNotSetDataSet);
531public static Exception CanNotUseDataViewManager() => _Data(SR.DataView_CanNotUseDataViewManager);
532public static Exception CanNotSetTable() => _Data(SR.DataView_CanNotSetTable);
533public static Exception CanNotUse() => _Data(SR.DataView_CanNotUse);
534public static Exception CanNotBindTable() => _Data(SR.DataView_CanNotBindTable);
535public static Exception SetTable() => _Data(SR.DataView_SetTable);
536public static Exception SetIListObject() => _Argument(SR.DataView_SetIListObject);
537public static Exception AddNewNotAllowNull() => _Data(SR.DataView_AddNewNotAllowNull);
538public static Exception NotOpen() => _Data(SR.DataView_NotOpen);
539public static Exception CreateChildView() => _Argument(SR.DataView_CreateChildView);
540public static Exception CanNotDelete() => _Data(SR.DataView_CanNotDelete);
541public static Exception CanNotEdit() => _Data(SR.DataView_CanNotEdit);
542public static Exception GetElementIndex(int index) => _IndexOutOfRange(SR.Format(SR.DataView_GetElementIndex, (index).ToString(CultureInfo.InvariantCulture)));
543public static Exception AddExternalObject() => _Argument(SR.DataView_AddExternalObject);
544public static Exception CanNotClear() => _Argument(SR.DataView_CanNotClear);
545public static Exception InsertExternalObject() => _Argument(SR.DataView_InsertExternalObject);
546public static Exception RemoveExternalObject() => _Argument(SR.DataView_RemoveExternalObject);
547public static Exception PropertyNotFound(string property, string table) => _Argument(SR.Format(SR.DataROWView_PropertyNotFound, property, table));
548public static Exception ColumnToSortIsOutOfRange(string column) => _Argument(SR.Format(SR.DataColumns_OutOfRange, column));
554public static Exception KeyTableMismatch() => _InvalidConstraint(SR.DataKey_TableMismatch);
555public static Exception KeyNoColumns() => _InvalidConstraint(SR.DataKey_NoColumns);
556public static Exception KeyTooManyColumns(int cols) => _InvalidConstraint(SR.Format(SR.DataKey_TooManyColumns, (cols).ToString(CultureInfo.InvariantCulture)));
557public static Exception KeyDuplicateColumns(string columnName) => _InvalidConstraint(SR.Format(SR.DataKey_DuplicateColumns, columnName));
563public static Exception RelationDataSetMismatch() => _InvalidConstraint(SR.DataRelation_DataSetMismatch);
564public static Exception NoRelationName() => _Argument(SR.DataRelation_NoName);
565public static Exception ColumnsTypeMismatch() => _InvalidConstraint(SR.DataRelation_ColumnsTypeMismatch);
566public static Exception KeyLengthMismatch() => _Argument(SR.DataRelation_KeyLengthMismatch);
567public static Exception KeyLengthZero() => _Argument(SR.DataRelation_KeyZeroLength);
568public static Exception ForeignRelation() => _Argument(SR.DataRelation_ForeignDataSet);
569public static Exception KeyColumnsIdentical() => _InvalidConstraint(SR.DataRelation_KeyColumnsIdentical);
570public static Exception RelationForeignTable(string t1, string t2) => _InvalidConstraint(SR.Format(SR.DataRelation_ForeignTable, t1, t2));
571public static Exception GetParentRowTableMismatch(string t1, string t2) => _InvalidConstraint(SR.Format(SR.DataRelation_GetParentRowTableMismatch, t1, t2));
572public static Exception SetParentRowTableMismatch(string t1, string t2) => _InvalidConstraint(SR.Format(SR.DataRelation_SetParentRowTableMismatch, t1, t2));
573public static Exception RelationForeignRow() => _Argument(SR.DataRelation_ForeignRow);
574public static Exception RelationNestedReadOnly() => _Argument(SR.DataRelation_RelationNestedReadOnly);
575public static Exception TableCantBeNestedInTwoTables(string tableName) => _Argument(SR.Format(SR.DataRelation_TableCantBeNestedInTwoTables, tableName));
576public static Exception LoopInNestedRelations(string tableName) => _Argument(SR.Format(SR.DataRelation_LoopInNestedRelations, tableName));
577public static Exception RelationDoesNotExist() => _Argument(SR.DataRelation_DoesNotExist);
578public static Exception ParentRowNotInTheDataSet() => _Argument(SR.DataRow_ParentRowNotInTheDataSet);
579public static Exception ParentOrChildColumnsDoNotHaveDataSet() => _InvalidConstraint(SR.DataRelation_ParentOrChildColumnsDoNotHaveDataSet);
580public static Exception InValidNestedRelation(string childTableName) => _InvalidOperation(SR.Format(SR.DataRelation_InValidNestedRelation, childTableName));
581public static Exception InvalidParentNamespaceinNestedRelation(string childTableName) => _InvalidOperation(SR.Format(SR.DataRelation_InValidNamespaceInNestedRelation, childTableName));
587public static Exception RowNotInTheDataSet() => _Argument(SR.DataRow_NotInTheDataSet);
588public static Exception RowNotInTheTable() => _RowNotInTable(SR.DataRow_NotInTheTable);
589public static Exception EditInRowChanging() => _InRowChangingEvent(SR.DataRow_EditInRowChanging);
590public static Exception EndEditInRowChanging() => _InRowChangingEvent(SR.DataRow_EndEditInRowChanging);
591public static Exception BeginEditInRowChanging() => _InRowChangingEvent(SR.DataRow_BeginEditInRowChanging);
592public static Exception CancelEditInRowChanging() => _InRowChangingEvent(SR.DataRow_CancelEditInRowChanging);
593public static Exception DeleteInRowDeleting() => _InRowChangingEvent(SR.DataRow_DeleteInRowDeleting);
594public static Exception ValueArrayLength() => _Argument(SR.DataRow_ValuesArrayLength);
595public static Exception NoCurrentData() => _VersionNotFound(SR.DataRow_NoCurrentData);
596public static Exception NoOriginalData() => _VersionNotFound(SR.DataRow_NoOriginalData);
597public static Exception NoProposedData() => _VersionNotFound(SR.DataRow_NoProposedData);
598public static Exception RowRemovedFromTheTable() => _RowNotInTable(SR.DataRow_RemovedFromTheTable);
599public static Exception DeletedRowInaccessible() => _DeletedRowInaccessible(SR.DataRow_DeletedRowInaccessible);
600public static Exception RowAlreadyDeleted() => _DeletedRowInaccessible(SR.DataRow_AlreadyDeleted);
601public static Exception RowEmpty() => _Argument(SR.DataRow_Empty);
602public static Exception InvalidRowVersion() => _Data(SR.DataRow_InvalidVersion);
603public static Exception RowOutOfRange() => _IndexOutOfRange(SR.DataRow_RowOutOfRange);
604public static Exception RowOutOfRange(int index) => _IndexOutOfRange(SR.Format(SR.DataRow_OutOfRange, (index).ToString(CultureInfo.InvariantCulture)));
605public static Exception RowInsertOutOfRange(int index) => _IndexOutOfRange(SR.Format(SR.DataRow_RowInsertOutOfRange, (index).ToString(CultureInfo.InvariantCulture)));
606public static Exception RowInsertTwice(int index, string tableName) => _IndexOutOfRange(SR.Format(SR.DataRow_RowInsertTwice, (index).ToString(CultureInfo.InvariantCulture), tableName));
607public static Exception RowInsertMissing(string tableName) => _IndexOutOfRange(SR.Format(SR.DataRow_RowInsertMissing, tableName));
608public static Exception RowAlreadyRemoved() => _Data(SR.DataRow_AlreadyRemoved);
609public static Exception MultipleParents() => _Data(SR.DataRow_MultipleParents);
610public static Exception InvalidRowState(DataRowState state) => _InvalidEnumArgumentException<DataRowState>(state);
611public static Exception InvalidRowBitPattern() => _Argument(SR.DataRow_InvalidRowBitPattern);
617internal static Exception SetDataSetNameToEmpty() => _Argument(SR.DataSet_SetNameToEmpty);
618internal static Exception SetDataSetNameConflicting(string name) => _Argument(SR.Format(SR.DataSet_SetDataSetNameConflicting, name));
619public static Exception DataSetUnsupportedSchema(string ns) => _Argument(SR.Format(SR.DataSet_UnsupportedSchema, ns));
620public static Exception MergeMissingDefinition(string obj) => _Argument(SR.Format(SR.DataMerge_MissingDefinition, obj));
621public static Exception TablesInDifferentSets() => _Argument(SR.DataRelation_TablesInDifferentSets);
622public static Exception RelationAlreadyExists() => _Argument(SR.DataRelation_AlreadyExists);
623public static Exception RowAlreadyInOtherCollection() => _Argument(SR.DataRow_AlreadyInOtherCollection);
624public static Exception RowAlreadyInTheCollection() => _Argument(SR.DataRow_AlreadyInTheCollection);
625public static Exception TableMissingPrimaryKey() => _MissingPrimaryKey(SR.DataTable_MissingPrimaryKey);
626public static Exception RecordStateRange() => _Argument(SR.DataIndex_RecordStateRange);
627public static Exception IndexKeyLength(int length, int keyLength) => length == 0 ?
630public static Exception RemovePrimaryKey(DataTable table) => table.TableName.Length == 0 ?
633public static Exception RelationAlreadyInOtherDataSet() => _Argument(SR.DataRelation_AlreadyInOtherDataSet);
634public static Exception RelationAlreadyInTheDataSet() => _Argument(SR.DataRelation_AlreadyInTheDataSet);
635public static Exception RelationNotInTheDataSet(string relation) => _Argument(SR.Format(SR.DataRelation_NotInTheDataSet, relation));
636public static Exception RelationOutOfRange(object index) => _IndexOutOfRange(SR.Format(SR.DataRelation_OutOfRange, Convert.ToString(index, null)));
637public static Exception DuplicateRelation(string relation) => _DuplicateName(SR.Format(SR.DataRelation_DuplicateName, relation));
638public static Exception RelationTableNull() => _Argument(SR.DataRelation_TableNull);
639public static Exception RelationDataSetNull() => _Argument(SR.DataRelation_TableNull);
640public static Exception RelationTableWasRemoved() => _Argument(SR.DataRelation_TableWasRemoved);
641public static Exception ParentTableMismatch() => _Argument(SR.DataRelation_ParentTableMismatch);
642public static Exception ChildTableMismatch() => _Argument(SR.DataRelation_ChildTableMismatch);
643public static Exception EnforceConstraint() => _Constraint(SR.Data_EnforceConstraints);
644public static Exception CaseLocaleMismatch() => _Argument(SR.DataRelation_CaseLocaleMismatch);
645public static Exception CannotChangeCaseLocale() => CannotChangeCaseLocale(null);
646public static Exception CannotChangeCaseLocale(Exception? innerException) => _Argument(SR.DataSet_CannotChangeCaseLocale, innerException);
647public static Exception CannotChangeSchemaSerializationMode() => _InvalidOperation(SR.DataSet_CannotChangeSchemaSerializationMode);
648public static Exception InvalidSchemaSerializationMode(Type enumType, string mode) => _InvalidEnumArgumentException(SR.Format(SR.ADP_InvalidEnumerationValue, enumType.Name, mode));
649public static Exception InvalidRemotingFormat(SerializationFormat mode) => _InvalidEnumArgumentException(mode);
650public static Exception SerializationFormatBinaryNotSupported() => _InvalidEnumArgumentException(SerializationFormat.Binary);
655public static Exception TableForeignPrimaryKey() => _Argument(SR.DataTable_ForeignPrimaryKey);
656public static Exception TableCannotAddToSimpleContent() => _Argument(SR.DataTable_CannotAddToSimpleContent);
657public static Exception NoTableName() => _Argument(SR.DataTable_NoName);
658public static Exception MultipleTextOnlyColumns() => _Argument(SR.DataTable_MultipleSimpleContentColumns);
659public static Exception InvalidSortString(string sort) => _Argument(SR.Format(SR.DataTable_InvalidSortString, sort));
660public static Exception DuplicateTableName(string table) => _DuplicateName(SR.Format(SR.DataTable_DuplicateName, table));
661public static Exception DuplicateTableName2(string table, string ns) => _DuplicateName(SR.Format(SR.DataTable_DuplicateName2, table, ns));
662public static Exception SelfnestedDatasetConflictingName(string table) => _DuplicateName(SR.Format(SR.DataTable_SelfnestedDatasetConflictingName, table));
663public static Exception DatasetConflictingName(string table) => _DuplicateName(SR.Format(SR.DataTable_DatasetConflictingName, table));
664public static Exception TableAlreadyInOtherDataSet() => _Argument(SR.DataTable_AlreadyInOtherDataSet);
665public static Exception TableAlreadyInTheDataSet() => _Argument(SR.DataTable_AlreadyInTheDataSet);
666public static Exception TableOutOfRange(int index) => _IndexOutOfRange(SR.Format(SR.DataTable_OutOfRange, (index).ToString(CultureInfo.InvariantCulture)));
667public static Exception TableNotInTheDataSet(string table) => _Argument(SR.Format(SR.DataTable_NotInTheDataSet, table));
668public static Exception TableInRelation() => _Argument(SR.DataTable_InRelation);
669public static Exception TableInConstraint(DataTable table, Constraint constraint) => _Argument(SR.Format(SR.DataTable_InConstraint, table.TableName, constraint.ConstraintName));
670public static Exception CanNotSerializeDataTableHierarchy() => _InvalidOperation(SR.DataTable_CanNotSerializeDataTableHierarchy);
671public static Exception CanNotRemoteDataTable() => _InvalidOperation(SR.DataTable_CanNotRemoteDataTable);
672public static Exception CanNotSetRemotingFormat() => _Argument(SR.DataTable_CanNotSetRemotingFormat);
673public static Exception CanNotSerializeDataTableWithEmptyName() => _InvalidOperation(SR.DataTable_CanNotSerializeDataTableWithEmptyName);
674public static Exception TableNotFound(string tableName) => _Argument(SR.Format(SR.DataTable_TableNotFound, tableName));
680public static Exception AggregateException(AggregateType aggregateType, Type type) => _Data(SR.Format(SR.DataStorage_AggregateException, aggregateType, type.Name));
681public static Exception InvalidStorageType(TypeCode typecode) => _Data(SR.Format(SR.DataStorage_InvalidStorageType, typecode.ToString()));
682public static Exception RangeArgument(int min, int max) => _Argument(SR.Format(SR.Range_Argument, (min).ToString(CultureInfo.InvariantCulture), (max).ToString(CultureInfo.InvariantCulture)));
683public static Exception NullRange() => _Data(SR.Range_NullRange);
684public static Exception NegativeMinimumCapacity() => _Argument(SR.RecordManager_MinimumCapacity);
685public static Exception ProblematicChars(char charValue) => _Argument(SR.Format(SR.DataStorage_ProblematicChars, $"0x{(ushort)charValue:X}"));
686public static Exception StorageSetFailed() => _Argument(SR.DataStorage_SetInvalidDataType);
692public static Exception SimpleTypeNotSupported() => _Data(SR.Xml_SimpleTypeNotSupported);
693public static Exception MissingAttribute(string attribute) => MissingAttribute(string.Empty, attribute);
694public static Exception MissingAttribute(string element, string attribute) => _Data(SR.Format(SR.Xml_MissingAttribute, element, attribute));
695public static Exception InvalidAttributeValue(string name, string value) => _Data(SR.Format(SR.Xml_ValueOutOfRange, name, value));
696public static Exception AttributeValues(string name, string value1, string value2) => _Data(SR.Format(SR.Xml_AttributeValues, name, value1, value2));
697public static Exception ElementTypeNotFound(string name) => _Data(SR.Format(SR.Xml_ElementTypeNotFound, name));
698public static Exception RelationParentNameMissing(string rel) => _Data(SR.Format(SR.Xml_RelationParentNameMissing, rel));
699public static Exception RelationChildNameMissing(string rel) => _Data(SR.Format(SR.Xml_RelationChildNameMissing, rel));
700public static Exception RelationTableKeyMissing(string rel) => _Data(SR.Format(SR.Xml_RelationTableKeyMissing, rel));
701public static Exception RelationChildKeyMissing(string rel) => _Data(SR.Format(SR.Xml_RelationChildKeyMissing, rel));
702public static Exception UndefinedDatatype(string name) => _Data(SR.Format(SR.Xml_UndefinedDatatype, name));
703public static Exception DatatypeNotDefined() => _Data(SR.Xml_DatatypeNotDefined);
704public static Exception MismatchKeyLength() => _Data(SR.Xml_MismatchKeyLength);
705public static Exception InvalidField(string name) => _Data(SR.Format(SR.Xml_InvalidField, name));
706public static Exception InvalidSelector(string name) => _Data(SR.Format(SR.Xml_InvalidSelector, name));
707public static Exception CircularComplexType(string name) => _Data(SR.Format(SR.Xml_CircularComplexType, name));
708public static Exception CannotInstantiateAbstract(string name) => _Data(SR.Format(SR.Xml_CannotInstantiateAbstract, name));
709public static Exception InvalidKey(string name) => _Data(SR.Format(SR.Xml_InvalidKey, name));
710public static Exception DiffgramMissingSQL() => _Data(SR.Xml_MissingSQL);
711public static Exception DuplicateConstraintRead(string str) => _Data(SR.Format(SR.Xml_DuplicateConstraint, str));
712public static Exception ColumnTypeConflict(string name) => _Data(SR.Format(SR.Xml_ColumnConflict, name));
713public static Exception CannotConvert(string name, string? type) => _Data(SR.Format(SR.Xml_CannotConvert, name, type));
714public static Exception MissingRefer(string name) => _Data(SR.Format(SR.Xml_MissingRefer, Keywords.REFER, Keywords.XSD_KEYREF, name));
715public static Exception InvalidPrefix(string name) => _Data(SR.Format(SR.Xml_InvalidPrefix_SpecialCharacters, name));
716public static Exception CanNotDeserializeObjectType() => _InvalidOperation(SR.Xml_CanNotDeserializeObjectType);
717public static Exception IsDataSetAttributeMissingInSchema() => _Data(SR.Xml_IsDataSetAttributeMissingInSchema);
718public static Exception TooManyIsDataSetAttributesInSchema() => _Data(SR.Xml_TooManyIsDataSetAttributesInSchema);
721public static Exception NestedCircular(string name) => _Data(SR.Format(SR.Xml_NestedCircular, name));
722public static Exception MultipleParentRows(string tableQName) => _Data(SR.Format(SR.Xml_MultipleParentRows, tableQName));
723public static Exception PolymorphismNotSupported(string typeName) => _InvalidOperation(SR.Format(SR.Xml_PolymorphismNotSupported, typeName));
724public static Exception DataTableInferenceNotSupported() => _InvalidOperation(SR.Xml_DataTableInferenceNotSupported);
727internal static void ThrowMultipleTargetConverter(Exception? innerException)
734public static Exception DuplicateDeclaration(string name) => _Data(SR.Format(SR.Xml_MergeDuplicateDeclaration, name));
737public static Exception FoundEntity() => _Data(SR.Xml_FoundEntity);
738public static Exception MergeFailed(string name) => _Data(name);
741public static Exception ConvertFailed(Type type1, Type type2) => _Data(SR.Format(SR.SqlConvert_ConvertFailed, type1.FullName, type2.FullName));
744public static Exception InvalidDataTableReader(string tableName) => _InvalidOperation(SR.Format(SR.DataTableReader_InvalidDataTableReader, tableName));
745public static Exception DataTableReaderSchemaIsInvalid(string tableName) => _InvalidOperation(SR.Format(SR.DataTableReader_SchemaInvalidDataTableReader, tableName));
746public static Exception CannotCreateDataReaderOnEmptyDataSet() => _Argument(SR.DataTableReader_CannotCreateDataReaderOnEmptyDataSet);
747public static Exception DataTableReaderArgumentIsEmpty() => _Argument(SR.DataTableReader_DataTableReaderArgumentIsEmpty);
748public static Exception ArgumentContainsNullValue() => _Argument(SR.DataTableReader_ArgumentContainsNullValue);
749public static Exception InvalidCurrentRowInDataTableReader() => _DeletedRowInaccessible(SR.DataTableReader_InvalidRowInDataTableReader);
750public static Exception EmptyDataTableReader(string tableName) => _DeletedRowInaccessible(SR.Format(SR.DataTableReader_DataTableCleared, tableName));
751internal static Exception InvalidDuplicateNamedSimpleTypeDelaration(string stName, string errorStr) => _Argument(SR.Format(SR.NamedSimpleType_InvalidDuplicateNamedSimpleTypeDelaration, stName, errorStr));
754internal static Exception InternalRBTreeError(RBTreeError internalError) => _InvalidOperation(SR.Format(SR.RbTree_InvalidState, (int)internalError));
755public static Exception EnumeratorModified() => _InvalidOperation(SR.RbTree_EnumerationBroken);
System\Data\Filter\FilterException.cs (50)
25public InvalidExpressionException(string? message, Exception? innerException) : base(message, innerException) { }
42public EvaluateException(string? message, Exception? innerException) : base(message, innerException) { }
59public SyntaxErrorException(string? message, Exception? innerException) : base(message, innerException) { }
89public static Exception InvokeArgument()
94public static Exception NYI(string moreinfo)
101public static Exception MissingOperand(OperatorInfo before)
106public static Exception MissingOperator(string token)
111public static Exception TypeMismatch(string expr)
116public static Exception FunctionArgumentOutOfRange(string arg, string func)
121public static Exception ExpressionTooComplex()
126public static Exception UnboundName(string name)
131public static Exception InvalidString(string str)
136public static Exception UndefinedFunction(string name)
141public static Exception SyntaxError()
146public static Exception FunctionArgumentCount(string name)
151public static Exception MissingRightParen()
156public static Exception UnknownToken(string token, int position)
161public static Exception UnknownToken(Tokens tokExpected, Tokens tokCurr, int position)
166public static Exception DatatypeConversion(Type type1, Type type2)
171public static Exception DatavalueConversion(object value, Type type)
176public static Exception InvalidName(string name)
181public static Exception InvalidDate(string date)
186public static Exception NonConstantArgument()
191public static Exception InvalidPattern(string pat)
196public static Exception InWithoutParentheses()
201public static Exception InWithoutList()
206public static Exception InvalidIsSyntax()
211public static Exception Overflow(Type type)
216public static Exception ArgumentType(string function, int arg, Type type)
221public static Exception ArgumentTypeInteger(string function, int arg)
226public static Exception TypeMismatchInBinop(int op, Type type1, Type type2)
231public static Exception AmbiguousBinop(int op, Type type1, Type type2)
236public static Exception UnsupportedOperator(int op)
241public static Exception InvalidNameBracketing(string name)
246public static Exception MissingOperandBefore(string op)
251public static Exception TooManyRightParentheses()
256public static Exception UnresolvedRelation(string name, string expr)
266public static Exception AggregateArgument()
271public static Exception AggregateUnbound(string expr)
276public static Exception EvalNoContext()
281public static Exception ExpressionUnbound(string expr)
286public static Exception ComputeNotAggregate(string expr)
291public static Exception FilterConversion(string expr)
296public static Exception LookupArgument()
301public static Exception InvalidType(string typeName)
306public static Exception InvalidHoursArgument()
311public static Exception InvalidMinutesArgument()
316public static Exception InvalidTimeZoneRange()
321public static Exception MismatchKindandTimeSpan()
326public static Exception UnsupportedDataType(Type type)
System\Data\SQLTypes\SQLUtility.cs (5)
40public SqlTypeException(string? message, Exception? e) : base(message, e)
78public SqlNullValueException(string? message, Exception? e) : base(message, e)
116public SqlTruncateException(string? message, Exception? e) : base(message, e)
154public SqlNotFilledException(string? message, Exception? e) : base(message, e)
179public SqlAlreadyFilledException(string? message, Exception? e) : base(message, e)
System.Data.Odbc (99)
Common\System\Data\Common\AdapterUtil.Odbc.cs (54)
41internal static Exception ExceptionWithStackTrace(Exception e)
47catch (Exception caught)
62internal static InvalidOperationException InvalidOperation(string error, Exception? inner)
213internal static Exception MethodNotImplemented([CallerMemberName] string methodName = "")
222internal static Exception OdbcNoTypesFromProvider()
230internal static Exception PooledOpenTimeout()
235internal static Exception NonPooledOpenTimeout()
255internal static Exception CommandTextRequired(string method)
270internal static Exception OpenReaderExists()
275internal static Exception OpenReaderExists(Exception? e)
283internal static Exception NonSeqByteAccess(long badIndex, long currIndex, string method)
288internal static Exception NumericToDecimalOverflow()
296internal static Exception InvalidCommandTimeout(int value)
300internal static Exception DeriveParametersNotSupported(IDbCommand value)
304internal static Exception UninitializedParameterSize(int index, Type dataType)
316internal static Exception ConnectionIsDisabled(Exception? InnerException)
320internal static Exception ClosedConnectionError()
324internal static Exception ConnectionAlreadyOpen(ConnectionState state)
328internal static Exception OpenConnectionPropertySet(string property, ConnectionState state)
332internal static Exception EmptyDatabaseName()
336internal static Exception DatabaseNameTooLong()
348internal static Exception InternalConnectionError(ConnectionError internalError)
356internal static Exception DataReaderNoData()
389internal static Exception ParameterConversionFailed(object value, Type destType, Exception inner)
394Exception e;
423internal static Exception ParametersMappingIndex(int index, IDataParameterCollection collection)
427internal static Exception ParametersSourceIndex(string parameterName, IDataParameterCollection collection, Type parameterType)
431internal static Exception ParameterNull(string parameter, IDataParameterCollection collection, Type parameterType)
435internal static Exception InvalidParameterType(IDataParameterCollection collection, Type parameterType, object invalidValue)
443internal static Exception ParallelTransactionsNotSupported(IDbConnection obj)
447internal static Exception TransactionZombied(IDbTransaction obj)
451internal static Exception OffsetOutOfRangeException()
460internal static Exception AmbiguousCollectionName(string collectionName)
465internal static Exception CollectionNameIsNotUnique(string collectionName)
470internal static Exception DataTableDoesNotExist(string collectionName)
475internal static Exception IncorrectNumberOfDataSourceInformationRows()
485internal static Exception InvalidXml()
490internal static Exception InvalidXmlMissingColumn(string collectionName, string columnName)
495internal static Exception InvalidXmlInvalidValue(string collectionName, string columnName)
500internal static Exception MissingDataSourceInformationColumn()
505internal static Exception MissingRestrictionColumn()
510internal static Exception MissingRestrictionRow()
515internal static Exception NoColumns()
520internal static Exception QueryFailed(string collectionName, Exception e)
525internal static Exception TooManyRestrictions(string collectionName)
530internal static Exception UnableToBuildCollection(string collectionName)
535internal static Exception UndefinedCollection(string collectionName)
540internal static Exception UndefinedPopulationMechanism(string populationMechanism)
545internal static Exception UnsupportedVersion(string collectionName)
System.Diagnostics.DiagnosticSource (18)
System.Diagnostics.EventLog (6)
System.Diagnostics.Process (15)
System.Diagnostics.StackTrace (1)
System.Diagnostics.TextWriterTraceListener (2)
System.Diagnostics.TraceSource (2)
System.DirectoryServices (11)
artifacts\obj\System.DirectoryServices\Debug\net10.0\System.DirectoryServices.notsupported.cs (11)
264public DirectoryServicesCOMException(string? message, System.Exception? inner) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServices_PlatformNotSupported); }
548public ActiveDirectoryObjectExistsException(string? message, System.Exception? inner) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServices_PlatformNotSupported); }
559public ActiveDirectoryObjectNotFoundException(string? message, System.Exception? inner) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServices_PlatformNotSupported); }
578public ActiveDirectoryOperationException(string? message, System.Exception? inner) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServices_PlatformNotSupported); }
579public ActiveDirectoryOperationException(string? message, System.Exception? inner, int errorCode) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServices_PlatformNotSupported); }
752public ActiveDirectoryServerDownException(string? message, System.Exception? inner) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServices_PlatformNotSupported); }
753public ActiveDirectoryServerDownException(string? message, System.Exception? inner, int errorCode, string? name) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServices_PlatformNotSupported); }
1320public ForestTrustCollisionException(string? message, System.Exception? inner) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServices_PlatformNotSupported); }
1321public ForestTrustCollisionException(string? message, System.Exception? inner, System.DirectoryServices.ActiveDirectory.ForestTrustRelationshipCollisionCollection? collisions) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServices_PlatformNotSupported); }
1712public SyncFromAllServersOperationException(string? message, System.Exception? inner) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServices_PlatformNotSupported); }
1713public SyncFromAllServersOperationException(string? message, System.Exception? inner, System.DirectoryServices.ActiveDirectory.SyncFromAllServersErrorInformation[]? errors) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServices_PlatformNotSupported); }
System.DirectoryServices.AccountManagement (9)
artifacts\obj\System.DirectoryServices.AccountManagement\Debug\net10.0\System.DirectoryServices.AccountManagement.notsupported.cs (9)
160public MultipleMatchesException(string message, System.Exception innerException) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesAccountManagement_PlatformNotSupported); }
171public NoMatchingPrincipalException(string message, System.Exception innerException) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesAccountManagement_PlatformNotSupported); }
182public PasswordException(string message, System.Exception innerException) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesAccountManagement_PlatformNotSupported); }
294public PrincipalExistsException(string message, System.Exception innerException) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesAccountManagement_PlatformNotSupported); }
305public PrincipalOperationException(string message, System.Exception innerException) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesAccountManagement_PlatformNotSupported); }
306public PrincipalOperationException(string message, System.Exception innerException, int errorCode) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesAccountManagement_PlatformNotSupported); }
343public PrincipalServerDownException(string message, System.Exception innerException) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesAccountManagement_PlatformNotSupported); }
344public PrincipalServerDownException(string message, System.Exception innerException, int errorCode) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesAccountManagement_PlatformNotSupported); }
345public PrincipalServerDownException(string message, System.Exception innerException, int errorCode, string serverName) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesAccountManagement_PlatformNotSupported); }
System.DirectoryServices.Protocols (8)
artifacts\obj\System.DirectoryServices.Protocols\Debug\net10.0\System.DirectoryServices.Protocols.notsupported.cs (8)
55public BerConversionException(string message, System.Exception inner) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesProtocols_PlatformNotSupported); }
203public DirectoryException(string message, System.Exception inner) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesProtocols_PlatformNotSupported); }
222public DirectoryOperationException(System.DirectoryServices.Protocols.DirectoryResponse response, string message, System.Exception inner) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesProtocols_PlatformNotSupported); }
229public DirectoryOperationException(string message, System.Exception inner) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesProtocols_PlatformNotSupported); }
362public LdapException(int errorCode, string message, System.Exception inner) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesProtocols_PlatformNotSupported); }
370public LdapException(string message, System.Exception inner) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesProtocols_PlatformNotSupported); }
729public TlsOperationException(System.DirectoryServices.Protocols.DirectoryResponse response, string message, System.Exception inner) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesProtocols_PlatformNotSupported); }
736public TlsOperationException(string message, System.Exception inner) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesProtocols_PlatformNotSupported); }
System.Drawing.Common.Tests (9)
System.Drawing.Primitives (2)
System.Formats.Asn1 (3)
System.Formats.Cbor (1)
System.Formats.Tar (4)
System.IO.Compression (5)
System.IO.Compression.ZipFile (4)
System.IO.FileSystem.DriveInfo (6)
System.IO.FileSystem.Watcher (12)
System.IO.IsolatedStorage (11)
System.IO.MemoryMappedFiles (4)
System.IO.Packaging (12)
System.IO.Pipelines (32)
System.IO.Pipes (13)
System.IO.Ports (7)
System.Linq.Expressions (25)
System.Linq.Parallel (49)
System.Linq.Queryable (6)
System.Management (1)
System.Memory (2)
System.Net.Http (170)
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http3.cs (12)
58private volatile Dictionary<HttpAuthority, Exception?>? _altSvcBlocklist;
81if (!TryGetHttp3Authority(request, out HttpAuthority? authority, out Exception? reasonException))
99catch (Exception ex)
260Exception? connectionException = null;
268if (TryGetHttp3Authority(queueItem.Request, out authority, out Exception? reasonException))
287catch (Exception e)
332private void HandleHttp3ConnectionFailure(HttpConnectionWaiter<Http3Connection?> requestWaiter, Exception? e)
616private bool TryGetHttp3Authority(HttpRequestMessage request, [NotNullWhen(true)] out HttpAuthority? authority, out Exception? reasonException)
777private bool IsAltSvcBlocked(HttpAuthority authority, out Exception? reasonException)
803internal void BlocklistAuthority(HttpAuthority badAuthority, Exception? exception = null)
807Dictionary<HttpAuthority, Exception?>? altSvcBlocklist = _altSvcBlocklist;
822altSvcBlocklist = new Dictionary<HttpAuthority, Exception?>();
System.Net.HttpListener (17)
System.Net.Mail (62)
System.Net.NameResolution (12)
System\Net\Dns.cs (8)
27catch (Exception ex) when (LogFailure(string.Empty, activity, ex))
132Exception? ex = t.Exception?.InnerException;
416catch (Exception ex) when (LogFailure(hostName, activity, ex))
458catch (Exception ex) when (LogFailure(address, activity, ex))
488catch (Exception ex) when (LogFailure(name, activity, ex))
618Exception? exception = null;
625catch (Exception ex)
657private static bool LogFailure(object hostNameOrAddress, in NameResolutionActivity activity, Exception exception)
System.Net.NetworkInformation (15)
System.Net.Ping (7)
System.Net.Primitives (5)
System.Net.Quic (42)
System.Net.Requests (57)
System.Net.Security (45)
System.Net.Sockets (41)
System.Net.WebClient (47)
System\Net\WebClient.cs (46)
308catch (Exception e) when (!(e is OutOfMemoryException))
338catch (Exception e) when (!(e is OutOfMemoryException))
373catch (Exception e) when (!(e is OutOfMemoryException))
411catch (Exception e) when (!(e is OutOfMemoryException))
463catch (Exception e) when (!(e is OutOfMemoryException))
576catch (Exception e)
643catch (Exception e) when (!(e is OutOfMemoryException))
708catch (Exception exception) when (!(exception is OutOfMemoryException)) { }
858catch (Exception e) when (!(e is OutOfMemoryException))
869AsyncOperation asyncOp, Action<byte[]?, Exception?, AsyncOperation> completionDelegate)
874Exception? exception = null;
928catch (Exception e) when (!(e is OutOfMemoryException))
996catch (Exception e) when (!(e is OutOfMemoryException))
1007AsyncOperation asyncOp, Action<byte[]?, Exception?, AsyncOperation> completionDelegate)
1013Exception? exception = null;
1071catch (Exception e) when (!(e is OutOfMemoryException))
1100catch (Exception e) when (e is NotImplementedException || e is NotSupportedException) // some types do this
1204Exception? exception = null;
1210catch (Exception e) when (!(e is OutOfMemoryException))
1218catch (Exception e) when (!(e is OutOfMemoryException))
1245Exception? exception = null;
1251catch (Exception e) when (!(e is OutOfMemoryException))
1259catch (Exception e) when (!(e is OutOfMemoryException))
1266private void DownloadStringAsyncCallback(byte[]? returnBytes, Exception? exception, object state)
1277catch (Exception e) when (!(e is OutOfMemoryException))
1300catch (Exception e) when (!(e is OutOfMemoryException))
1306private void DownloadDataAsyncCallback(byte[]? returnBytes, Exception? exception, object state)
1326catch (Exception e) when (!(e is OutOfMemoryException))
1332private void DownloadFileAsyncCallback(byte[]? returnBytes, Exception? exception, object state)
1355catch (Exception e) when (!(e is OutOfMemoryException))
1394catch (Exception e) when (!(e is OutOfMemoryException))
1404catch (Exception e) when (!(e is OutOfMemoryException))
1443catch (Exception e) when (!(e is OutOfMemoryException))
1479catch (Exception e) when (!(e is OutOfMemoryException))
1519catch (Exception e) when (!(e is OutOfMemoryException))
1526private static Exception GetExceptionToPropagate(Exception e) =>
1914internal OpenReadCompletedEventArgs(Stream? result, Exception? exception, bool cancelled, object? userToken) : base(exception, cancelled, userToken)
1933internal OpenWriteCompletedEventArgs(Stream? result, Exception? exception, bool cancelled, object? userToken) : base(exception, cancelled, userToken)
1952internal DownloadStringCompletedEventArgs(string? result, Exception? exception, bool cancelled, object? userToken) : base(exception, cancelled, userToken)
1972internal DownloadDataCompletedEventArgs(byte[]? result, Exception? exception, bool cancelled, object? userToken) : base(exception, cancelled, userToken)
1991internal UploadStringCompletedEventArgs(string? result, Exception? exception, bool cancelled, object? userToken) : base(exception, cancelled, userToken)
2010internal UploadDataCompletedEventArgs(byte[]? result, Exception? exception, bool cancelled, object? userToken) : base(exception, cancelled, userToken)
2029internal UploadFileCompletedEventArgs(byte[]? result, Exception? exception, bool cancelled, object? userToken) : base(exception, cancelled, userToken)
2048internal UploadValuesCompletedEventArgs(byte[]? result, Exception? exception, bool cancelled, object? userToken) : base(exception, cancelled, userToken)
2104public Exception? Error { get { return null; } }
System.Net.WebSockets (30)
System\Net\WebSockets\WebSocketException.cs (6)
32public WebSocketException(WebSocketError error, Exception? innerException)
37public WebSocketException(WebSocketError error, string? message, Exception? innerException)
57public WebSocketException(int nativeError, Exception? innerException)
76public WebSocketException(WebSocketError error, int nativeError, Exception? innerException)
81public WebSocketException(WebSocketError error, int nativeError, string? message, Exception? innerException)
93public WebSocketException(string? message, Exception? innerException)
System.Net.WebSockets.Client (1)
System.Private.CoreLib (483)
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeFileHandle.Unix.cs (6)
92Func<Interop.ErrorInfo, Interop.Sys.OpenFlags, string, Exception?>? createOpenException)
110if (createOpenException?.Invoke(error, flags, path) is Exception ex)
185Func<Interop.ErrorInfo, Interop.Sys.OpenFlags, string, Exception?>? createOpenException = null)
191Func<Interop.ErrorInfo, Interop.Sys.OpenFlags, string, Exception?>? createOpenException = null)
198Func<Interop.ErrorInfo, Interop.Sys.OpenFlags, string, Exception?>? createOpenException = null)
229catch (Exception)
src\libraries\System.Private.CoreLib\src\System\AggregateException.cs (33)
26private readonly Exception[] _innerExceptions; // Complete set of exceptions.
27private ReadOnlyCollection<Exception>? _rocView; // separate from _innerExceptions to enable trimming if InnerExceptions isn't used
45_innerExceptions = Array.Empty<Exception>();
56public AggregateException(string? message, Exception innerException)
73public AggregateException(IEnumerable<Exception> innerExceptions) :
87public AggregateException(params Exception[] innerExceptions) :
102public AggregateException(string? message, IEnumerable<Exception> innerExceptions)
103: this(message, new List<Exception>(innerExceptions ?? throw new ArgumentNullException(nameof(innerExceptions))).ToArray(), cloneExceptions: false)
117public AggregateException(string? message, params Exception[] innerExceptions) :
122private AggregateException(string? message, Exception[] innerExceptions, bool cloneExceptions) :
125_innerExceptions = cloneExceptions ? new Exception[innerExceptions.Length] : innerExceptions;
170_innerExceptions = new Exception[innerExceptionInfos.Count];
193_innerExceptions = info.GetValue("InnerExceptions", typeof(Exception[])) as Exception[] ?? // Do not rename (binary serialization);
212info.AddValue("InnerExceptions", _innerExceptions, typeof(Exception[])); // Do not rename (binary serialization)
216/// Returns the <see cref="Exception"/> that is the root cause of this exception.
222public override Exception GetBaseException()
226Exception? back = this;
237/// Gets a read-only collection of the <see cref="Exception"/> instances that caused the
240public ReadOnlyCollection<Exception> InnerExceptions => _rocView ??= new ReadOnlyCollection<Exception>(_innerExceptions);
244/// Invokes a handler on each <see cref="Exception"/> contained by this <see
248/// argument the <see cref="Exception"/> to be processed and returns a Boolean to indicate
252/// <see cref="Exception"/> was handled. After all invocations, if any exceptions went
262public void Handle(Func<Exception, bool> predicate)
266List<Exception>? unhandledExceptions = null;
273unhandledExceptions ??= new List<Exception>();
287/// Flattens the inner instances of <see cref="AggregateException"/> by expanding its contained <see cref="Exception"/> instances
301List<Exception> flattenedExceptions = new List<Exception>();
311ReadOnlyCollection<Exception> currentInnerExceptions = exceptionsToFlatten[nDequeueIndex++].InnerExceptions;
315Exception currentInnerException = currentInnerExceptions[i];
397internal Exception[] InternalInnerExceptions => _innerExceptions;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\IncrementingPollingCounter.cs (1)
58catch (Exception ex)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\PollingCounter.cs (1)
54catch (Exception ex)
src\libraries\System.Private.CoreLib\src\System\Runtime\Versioning\FrameworkName.cs (1)
171catch (Exception e)
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.GateThread.cs (1)
246catch (Exception e)
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.cs (5)
607Exception? e;
649private static TimeZoneInfoResult TryFindSystemTimeZoneById(string id, out TimeZoneInfo? timeZone, out Exception? e)
1998private static TimeZoneInfoResult TryGetTimeZone(string id, bool dstDisabled, out TimeZoneInfo? value, out Exception? e, CachedData cachedData, bool alwaysFallbackToLocalMachine = false)
2053private static TimeZoneInfoResult TryGetTimeZoneUsingId(string id, bool dstDisabled, out TimeZoneInfo? value, out Exception? e, CachedData cachedData, bool alwaysFallbackToLocalMachine)
2121private static TimeZoneInfoResult TryGetTimeZoneFromLocalMachine(string id, bool dstDisabled, out TimeZoneInfo? value, out Exception? e, CachedData cachedData)
System.Private.DataContractSerialization (29)
System.Private.Uri (1)
System.Private.Windows.Core (25)
System.Private.Windows.GdiPlus (1)
System.Private.Xml (294)
System\Xml\Core\XmlTextReaderImpl.cs (9)
2628internal void DtdParserProxy_Throw(Exception e)
2704private void Throw(string res, string? arg, Exception innerException)
2710private void Throw(string res, string?[] args, Exception innerException)
2716private void Throw(Exception e)
2730private void ReThrow(Exception e, int lineNo, int linePos)
2732Throw(new XmlException(e.Message, (Exception?)null, lineNo, linePos, _ps.baseUriStr));
2748private void ThrowWithoutLineInfo(string res, string?[] args, Exception? innerException)
7905catch (Exception)
7922catch (Exception e)
System\Xml\Schema\DataTypeImplementation.cs (74)
532Exception? exception = TryParseValue(s, nameTable, nsmgr, out typedValue);
553Exception? exception = TryParseValue(s, nameTable, nsmgr, out typedValue);
568internal override Exception? TryParseValue(object value, XmlNameTable? nameTable, IXmlNamespaceResolver? namespaceResolver, out object? typedValue)
572Exception? exception;
1014internal override Exception? TryParseValue(object value, XmlNameTable? nameTable, IXmlNamespaceResolver? namespaceResolver, out object? typedValue)
1018Exception? exception;
1090internal override Exception? TryParseValue(string s, XmlNameTable? nameTable, IXmlNamespaceResolver? nsmgr, out object? typedValue)
1092Exception? exception;
1238internal override Exception? TryParseValue(string s, XmlNameTable? nameTable, IXmlNamespaceResolver? nsmgr, out object? typedValue)
1240Exception? exception;
1277internal override Exception? TryParseValue(object value, XmlNameTable? nameTable, IXmlNamespaceResolver? nsmgr, out object? typedValue)
1281Exception? exception;
1375internal override Exception? TryParseValue(string s, XmlNameTable? nameTable, IXmlNamespaceResolver? nsmgr, out object? typedValue)
1456internal override Exception? TryParseValue(string s, XmlNameTable? nameTable, IXmlNamespaceResolver? nsmgr, out object? typedValue)
1458Exception? exception;
1527internal override Exception? TryParseValue(string s, XmlNameTable? nameTable, IXmlNamespaceResolver? nsmgr, out object? typedValue)
1529Exception? exception;
1609internal override Exception? TryParseValue(string s, XmlNameTable? nameTable, IXmlNamespaceResolver? nsmgr, out object? typedValue)
1611Exception? exception;
1695internal override Exception? TryParseValue(string s, XmlNameTable? nameTable, IXmlNamespaceResolver? nsmgr, out object? typedValue)
1697Exception? exception;
1787internal override Exception? TryParseValue(string s, XmlNameTable? nameTable, IXmlNamespaceResolver? nsmgr, out object? typedValue)
1789Exception? exception;
1875internal override Exception? TryParseValue(string s, XmlNameTable? nameTable, IXmlNamespaceResolver? nsmgr, out object? typedValue)
1877Exception? exception;
1906internal override Exception? TryParseValue(string s, XmlNameTable? nameTable, IXmlNamespaceResolver? nsmgr, out object? typedValue)
1908Exception? exception;
1944internal override Exception? TryParseValue(string s, XmlNameTable? nameTable, IXmlNamespaceResolver? nsmgr, out object? typedValue)
1946Exception? exception;
2030internal override Exception? TryParseValue(string s, XmlNameTable? nameTable, IXmlNamespaceResolver? nsmgr, out object? typedValue)
2032Exception? exception;
2412internal override Exception? TryParseValue(string s, XmlNameTable? nameTable, IXmlNamespaceResolver? nsmgr, out object? typedValue)
2414Exception? exception;
2510internal override Exception? TryParseValue(string s, XmlNameTable? nameTable, IXmlNamespaceResolver? nsmgr, out object? typedValue)
2512Exception? exception;
2614internal override Exception? TryParseValue(string s, XmlNameTable? nameTable, IXmlNamespaceResolver? nsmgr, out object? typedValue)
2616Exception? exception;
2699internal override Exception? TryParseValue(string s, XmlNameTable? nameTable, IXmlNamespaceResolver? nsmgr, out object? typedValue)
2701Exception? exception;
2899internal override Exception? TryParseValue(string s, XmlNameTable? nameTable, IXmlNamespaceResolver? nsmgr, out object? typedValue)
2901Exception? exception;
3032internal override Exception? TryParseValue(string s, XmlNameTable? nameTable, IXmlNamespaceResolver? nsmgr, out object? typedValue)
3034Exception? exception;
3112internal override Exception? TryParseValue(string s, XmlNameTable? nameTable, IXmlNamespaceResolver? nsmgr, out object? typedValue)
3114Exception? exception;
3228internal override Exception? TryParseValue(string s, XmlNameTable? nameTable, IXmlNamespaceResolver? nsmgr, out object? typedValue)
3230Exception? exception;
3282internal override Exception? TryParseValue(string s, XmlNameTable? nameTable, IXmlNamespaceResolver? nsmgr, out object? typedValue)
3284Exception? exception;
3337internal override Exception? TryParseValue(string s, XmlNameTable? nameTable, IXmlNamespaceResolver? nsmgr, out object? typedValue)
3339Exception? exception;
3391internal override Exception? TryParseValue(string s, XmlNameTable? nameTable, IXmlNamespaceResolver? nsmgr, out object? typedValue)
3393Exception? exception;
3477internal override Exception? TryParseValue(string s, XmlNameTable? nameTable, IXmlNamespaceResolver? nsmgr, out object? typedValue)
3479Exception? exception;
3531internal override Exception? TryParseValue(string s, XmlNameTable? nameTable, IXmlNamespaceResolver? nsmgr, out object? typedValue)
3533Exception? exception;
3585internal override Exception? TryParseValue(string s, XmlNameTable? nameTable, IXmlNamespaceResolver? nsmgr, out object? typedValue)
3587Exception? exception;
3638internal override Exception? TryParseValue(string s, XmlNameTable? nameTable, IXmlNamespaceResolver? nsmgr, out object? typedValue)
3640Exception? exception;
3695catch (Exception e)
3717catch (Exception e)
3751catch (Exception e)
3791catch (Exception e)
3797internal override Exception? TryParseValue(string s, XmlNameTable? nameTable, IXmlNamespaceResolver? nsmgr, out object? typedValue)
3799Exception? exception;
3820Exception? exception;
3834catch (Exception e)
3842internal override Exception? TryParseValue(string s, XmlNameTable? nameTable, IXmlNamespaceResolver? nsmgr, out object? typedValue)
3844Exception? exception;
3887catch (Exception e)
3893internal override Exception? TryParseValue(string s, XmlNameTable? nameTable, IXmlNamespaceResolver? nsmgr, out object? typedValue)
3895Exception? exception;
System\Xml\Schema\FacetChecker.cs (41)
369catch (Exception e)
666Exception? ex = datatype.TryParseValue(facet.Value!, nameTable, nsmgr, out typedValue);
777internal virtual Exception? CheckLexicalFacets(ref string parseString, XmlSchemaDatatype datatype)
782internal virtual Exception? CheckValueFacets(object value, XmlSchemaDatatype datatype)
786internal virtual Exception? CheckValueFacets(decimal value, XmlSchemaDatatype datatype)
790internal virtual Exception? CheckValueFacets(long value, XmlSchemaDatatype datatype)
794internal virtual Exception? CheckValueFacets(int value, XmlSchemaDatatype datatype)
798internal virtual Exception? CheckValueFacets(short value, XmlSchemaDatatype datatype)
802internal virtual Exception? CheckValueFacets(DateTime value, XmlSchemaDatatype datatype)
806internal virtual Exception? CheckValueFacets(double value, XmlSchemaDatatype datatype)
810internal virtual Exception? CheckValueFacets(float value, XmlSchemaDatatype datatype)
814internal virtual Exception? CheckValueFacets(string value, XmlSchemaDatatype datatype)
818internal virtual Exception? CheckValueFacets(byte[] value, XmlSchemaDatatype datatype)
822internal virtual Exception? CheckValueFacets(TimeSpan value, XmlSchemaDatatype datatype)
826internal virtual Exception? CheckValueFacets(XmlQualifiedName value, XmlSchemaDatatype datatype)
868internal static Exception? CheckPatternFacets(RestrictionFacets? restriction, string value)
997internal override Exception? CheckValueFacets(object value, XmlSchemaDatatype datatype)
1003internal override Exception? CheckValueFacets(decimal value, XmlSchemaDatatype datatype)
1061internal override Exception? CheckValueFacets(long value, XmlSchemaDatatype datatype)
1067internal override Exception? CheckValueFacets(int value, XmlSchemaDatatype datatype)
1072internal override Exception? CheckValueFacets(short value, XmlSchemaDatatype datatype)
1093internal static Exception? CheckTotalAndFractionDigits(decimal value, int totalDigits, int fractionDigits, bool checkTotal, bool checkFraction)
1122internal override Exception? CheckValueFacets(object value, XmlSchemaDatatype datatype)
1128internal override Exception? CheckValueFacets(double value, XmlSchemaDatatype datatype)
1174internal override Exception? CheckValueFacets(float value, XmlSchemaDatatype datatype)
1198internal override Exception? CheckValueFacets(object value, XmlSchemaDatatype datatype)
1204internal override Exception? CheckValueFacets(TimeSpan value, XmlSchemaDatatype datatype)
1269internal override Exception? CheckValueFacets(object value, XmlSchemaDatatype datatype)
1275internal override Exception? CheckValueFacets(DateTime value, XmlSchemaDatatype datatype)
1347internal override Exception? CheckValueFacets(object value, XmlSchemaDatatype datatype)
1353internal override Exception? CheckValueFacets(string value, XmlSchemaDatatype datatype)
1358internal static Exception? CheckValueFacets(string value, XmlSchemaDatatype datatype, bool verifyUri)
1364Exception? exception;
1433private static Exception? CheckBuiltInFacets(string s, XmlTypeCode typeCode, bool verifyUri)
1435Exception? exception = null;
1488internal override Exception? CheckValueFacets(object value, XmlSchemaDatatype datatype)
1494internal override Exception? CheckValueFacets(XmlQualifiedName value, XmlSchemaDatatype datatype)
1560internal override Exception? CheckValueFacets(object value, XmlSchemaDatatype datatype)
1566internal override Exception? CheckValueFacets(byte[] value, XmlSchemaDatatype datatype)
1625internal override Exception? CheckValueFacets(object value, XmlSchemaDatatype datatype)
1701internal override Exception? CheckValueFacets(object value, XmlSchemaDatatype datatype)
System\Xml\Schema\Inference\XmlSchemaInferenceException.cs (3)
36public XmlSchemaInferenceException(string message) : base(message, ((Exception?)null), 0, 0)
40public XmlSchemaInferenceException(string message, Exception? innerException) : base(message, innerException, 0, 0)
44public XmlSchemaInferenceException(string message, Exception? innerException, int lineNumber, int linePosition) :
System\Xml\Schema\XmlSchemaException.cs (4)
80public XmlSchemaException(string? message) : this(message, ((Exception?)null), 0, 0)
87public XmlSchemaException(string? message, Exception? innerException) : this(message, innerException, 0, 0)
91public XmlSchemaException(string? message, Exception? innerException, int lineNumber, int linePosition) :
128internal XmlSchemaException(string? res, string?[]? args, Exception? innerException, string? sourceUri, int lineNumber, int linePosition, XmlSchemaObject? source) :
System\Xml\Schema\XmlSchemaValidationException.cs (4)
37public XmlSchemaValidationException(string? message) : base(message, ((Exception?)null), 0, 0)
41public XmlSchemaValidationException(string? message, Exception? innerException) : base(message, innerException, 0, 0)
45public XmlSchemaValidationException(string? message, Exception? innerException, int lineNumber, int linePosition) :
60internal XmlSchemaValidationException(string? res, string?[]? args, Exception? innerException, string? sourceUri, int lineNumber, int linePosition) :
System\Xml\Schema\XmlSchemaValidator.cs (9)
1275Exception? exception = s_dtStringArray.TryParseValue(xsiSchemaLocation, _nameTable, _nsResolver, out typedValue);
1430Exception? exception = currentElementDecl.Datatype.TryParseValue(currentElementDecl.DefaultValueRaw, _nameTable, _nsResolver, out typedVal);
1474Exception? exception = dtype.TryParseValue(parsedValue, _nameTable, _nsResolver, out typedValue);
1647Exception? exception = s_dtQName.TryParseValue(xsiType, _nameTable, _nsResolver, out typedVal);
1859catch (Exception e)
1936Exception? exception;
1975Exception? exception = dtype.TryParseValue(stringValue, _nameTable, _nsResolver, out typedValue);
2822private void SendValidationEvent(string? code, string?[]? args, Exception? innerException, XmlSeverityType severity)
2830private void SendValidationEvent(string? code, string?[]? args, Exception? innerException)
System\Xml\Serialization\XmlSerializationReader.cs (12)
1068catch (Exception e)
1283protected Exception CreateUnknownTypeException(XmlQualifiedName type)
1288protected Exception CreateReadOnlyCollectionException(string name)
1293protected Exception CreateAbstractTypeException(string name, string? ns)
1298protected Exception CreateInaccessibleConstructorException(string typeName)
1303protected Exception CreateCtorHasSecurityException(string typeName)
1308protected Exception CreateUnknownNodeException()
1313protected Exception CreateUnknownConstantException(string? value, Type enumType)
1318protected Exception CreateInvalidCastException(Type type, object? value)
1323protected Exception CreateInvalidCastException(Type type, object? value, string? id)
1333protected Exception CreateBadDerivationException(string? xsdDerived, string? nsDerived, string? xsdBase, string? nsBase, string? clrDerived, string? clrBase)
1338protected Exception CreateMissingIXmlSerializableType(string? name, string? ns, string? clrType)
System\Xml\XmlConvert.cs (42)
329internal static Exception? TryVerifyName(string name)
385internal static Exception? TryVerifyNCName(string name)
419internal static Exception? TryVerifyTOKEN(string token)
465internal static Exception? TryVerifyNMTOKEN(string name)
481internal static Exception? TryVerifyNormalizedString(string str)
760internal static Exception? TryToBoolean(string s, out bool result)
790internal static Exception? TryToChar(string s, out char result)
805internal static Exception? TryToDecimal(string s, out decimal result)
820internal static Exception? TryToInteger(string s, out decimal result)
836internal static Exception? TryToSByte(string s, out sbyte result)
851internal static Exception? TryToInt16(string s, out short result)
866internal static Exception? TryToInt32(string s, out int result)
881internal static Exception? TryToInt64(string s, out long result)
896internal static Exception? TryToByte(string s, out byte result)
912internal static Exception? TryToUInt16(string s, out ushort result)
928internal static Exception? TryToUInt32(string s, out uint result)
944internal static Exception? TryToUInt64(string s, out ulong result)
976internal static Exception? TryToSingle(string s, out float result)
1023internal static Exception? TryToDouble(string s, out double result)
1118catch (Exception)
1129internal static Exception? TryToTimeSpan(string s, out TimeSpan result)
1132Exception? exception;
1266internal static Exception? TryToGuid(string s, out Guid result)
1268Exception? exception = null;
1327internal static Exception? TryToUri(string s, out Uri? result)
1529internal static Exception CreateException(string res, ExceptionType exceptionType, int lineNo, int linePos)
1541internal static Exception CreateException(string res, string arg, ExceptionType exceptionType)
1546internal static Exception CreateException(string res, string arg, ExceptionType exceptionType, int lineNo, int linePos)
1558internal static Exception CreateException(string res, string[] args, ExceptionType exceptionType)
1563internal static Exception CreateException(string res, string[] args, ExceptionType exceptionType, int lineNo, int linePos)
1575internal static Exception CreateInvalidSurrogatePairException(char low, char hi)
1580internal static Exception CreateInvalidSurrogatePairException(char low, char hi, ExceptionType exceptionType)
1585internal static Exception CreateInvalidSurrogatePairException(char low, char hi, ExceptionType exceptionType, int lineNo, int linePos)
1594internal static Exception CreateInvalidHighSurrogateCharException(char hi)
1599internal static Exception CreateInvalidHighSurrogateCharException(char hi, ExceptionType exceptionType)
1604internal static Exception CreateInvalidHighSurrogateCharException(char hi, ExceptionType exceptionType, int lineNo, int linePos)
1609internal static Exception CreateInvalidCharException(char[] data, int length, int invCharPos, ExceptionType exceptionType)
1614internal static Exception CreateInvalidCharException(string data, int invCharPos)
1619internal static Exception CreateInvalidCharException(string data, int invCharPos, ExceptionType exceptionType)
1624internal static Exception CreateInvalidCharException(char invChar, char nextChar)
1629internal static Exception CreateInvalidCharException(char invChar, char nextChar, ExceptionType exceptionType)
1634internal static Exception CreateInvalidNameCharException(string name, int index, ExceptionType exceptionType)
System\Xml\XmlException.cs (8)
90public XmlException(string? message) : this(message, ((Exception?)null), 0, 0)
96public XmlException(string? message, Exception? innerException) : this(message, innerException, 0, 0)
101public XmlException(string? message, Exception? innerException, int lineNumber, int linePosition) :
106internal XmlException(string? message, Exception? innerException, int lineNumber, int linePosition, string? sourceUri) :
133internal XmlException(string res, string? arg, Exception? innerException, IXmlLineInfo? lineInfo) :
162internal XmlException(string res, string?[]? args, Exception? innerException, int lineNumber, int linePosition) :
166internal XmlException(string res, string?[]? args, Exception? innerException, int lineNumber, int linePosition, string? sourceUri) :
292internal static bool IsCatchableException(Exception e)
System\Xml\Xslt\XsltException.cs (7)
72public XsltException() : this(string.Empty, (Exception?)null) { }
74public XsltException(string message) : this(message, (Exception?)null) { }
76public XsltException(string message, Exception? innerException) :
86internal static XsltException Create(string res, string?[] args, Exception inner)
91internal XsltException(string res, string?[] args, string? sourceUri, int lineNumber, int linePosition, Exception? inner)
174public XsltCompileException(string message, Exception innerException) : base(message, innerException) { }
176public XsltCompileException(Exception inner, string sourceUri, int lineNumber, int linePosition) :
System.Reflection.Metadata (15)
System.Reflection.MetadataLoadContext (33)
System\Reflection\TypeLoading\General\Ecma\EcmaResolver.cs (6)
66RoDefinitionType? type = module.GetEcmaAssembly().GetTypeCore(ns, name, ignoreCase: false, out Exception? e);
79RoDefinitionType? type = assembly.GetTypeCore(ns, name, ignoreCase: false, out Exception? e);
94RoDefinitionType? type = module.GetTypeCore(ns, name, ignoreCase: false, out Exception? e);
107RoDefinitionType? type = targetModule.GetTypeCore(ns, name, ignoreCase: false, out Exception? e);
150RoAssembly? assembly = handle.TryResolveAssembly(module, out Exception? e);
156public static RoAssembly? TryResolveAssembly(this AssemblyReferenceHandle handle, EcmaModule module, out Exception? e)
System.Resources.Extensions (3)
System.Runtime (1)
System.Runtime.Caching (1)
System.Runtime.InteropServices (10)
System.Runtime.InteropServices.JavaScript (2)
System.Runtime.Numerics (1)
System.Runtime.Serialization.Formatters (2)
System.Runtime.Serialization.Primitives (1)
System.Runtime.Serialization.Schema (12)
System.Security.AccessControl (2)
System.Security.Cryptography (26)
src\libraries\Common\src\System\IO\MemoryMappedFiles\MemoryMappedFileMemoryManager.cs (1)
54catch (Exception)
System\Security\Cryptography\X509Certificates\OpenSslDirectoryBasedStoreProvider.cs (1)
124catch (Exception e)
System.Security.Cryptography.Cose (7)
System.Security.Cryptography.Pkcs (19)
System.Security.Cryptography.Xml (4)
System.Security.Permissions (3)
System.Security.Principal.Windows (1)
System.ServiceModel.Federation (16)
System.ServiceModel.Federation.Tests (2)
System.ServiceModel.NetFramingBase (37)
System.ServiceModel.NetNamedPipe (14)
System.ServiceModel.Primitives (23)
netstandard.cs (23)
377public SecurityTokenException(string message, System.Exception innerException) { }
385public SecurityTokenValidationException(string message, System.Exception innerException) { }
421public ActionNotSupportedException(string message, System.Exception innerException) { }
469public ChannelTerminatedException(string message, System.Exception innerException) { }
583public CommunicationException(string message, System.Exception innerException) { }
590public CommunicationObjectAbortedException(string message, System.Exception innerException) { }
597public CommunicationObjectFaultedException(string message, System.Exception innerException) { }
668public EndpointNotFoundException(string message, System.Exception innerException) { }
684public ExceptionDetail(System.Exception exception) { }
850public InvalidMessageContractException(string message, System.Exception innerException) { }
912public MessageHeaderException(string message, System.Exception innerException) : base(default) { }
915public MessageHeaderException(string message, string headerName, string ns, bool isDuplicate, System.Exception innerException) : base(default) { }
916public MessageHeaderException(string message, string headerName, string ns, System.Exception innerException) : base(default) { }
981public ProtocolException(string message, System.Exception innerException) { }
993public QuotaExceededException(string message, System.Exception innerException) { }
1020public ServerTooBusyException(string message, System.Exception innerException) { }
1026public ServiceActivationException(string message, System.Exception innerException) { }
1435protected abstract bool OnTryCreateException(System.ServiceModel.Channels.Message message, System.ServiceModel.Channels.MessageFault fault, out System.Exception exception);
1436protected abstract bool OnTryCreateFaultMessage(System.Exception exception, out System.ServiceModel.Channels.Message message);
1437public bool TryCreateException(System.ServiceModel.Channels.Message message, System.ServiceModel.Channels.MessageFault fault, out System.Exception exception) { exception = default; return default; }
2258public MessageSecurityException(string message, System.Exception innerException) { }
2264public SecurityAccessDeniedException(string message, System.Exception innerException) { }
2276public SecurityNegotiationException(string message, System.Exception innerException) { }
System.ServiceModel.Primitives.Tests (14)
ServiceModel\ThrowingOnCloseBindingElement.cs (9)
13private Exception _exception;
21public ThrowingOnCloseBindingElement(Exception exception, bool channelThrows)
186public ThrowingOutputChannel(ThrowingChannelFactory<TChannel> factory, Exception exception, IOutputChannel innerChannel)
203public ThrowingRequestChannel(ThrowingChannelFactory<TChannel> factory, Exception exception, IRequestChannel innerChannel)
223ThrowingChannelFactory<TChannel> factory, Exception exception, IOutputSessionChannel innerChannel)
236ThrowingChannelFactory<TChannel> factory, Exception exception, IRequestSessionChannel innerChannel)
247public ThrowingInputChannel(ChannelManagerBase manager, Exception exception, T innerChannel) : base(manager, exception, innerChannel)
268public ThrowingDuplexChannel(ChannelManagerBase manager, Exception exception, IDuplexChannel innerChannel) : base(manager, exception, innerChannel)
286public ThrowingDuplexSessionChannel(ChannelManagerBase manager, Exception exception, IDuplexSessionChannel innerChannel) : base(manager, exception, innerChannel)
System.ServiceModel.Syndication (5)
System.ServiceModel.UnixDomainSocket (14)
System\ServiceModel\Channels\SocketConnection.cs (14)
208Exception exceptionToThrow = ConvertObjectDisposedException(objectDisposedException, TransferOperation.Read);
287Exception exceptionToThrow = ConvertObjectDisposedException(objectDisposedException, TransferOperation.Write);
396Exception exceptionToThrow = ConvertObjectDisposedException(objectDisposedException, TransferOperation.Undefined);
426catch (Exception exception)
449catch (Exception exception)
617private Exception ConvertObjectDisposedException(ObjectDisposedException originalException, TransferOperation transferOperation)
633private Exception ConvertSendException(SocketException socketException, TimeSpan remainingTime, TimeSpan timeout)
639private Exception ConvertReceiveException(SocketException socketException, TimeSpan remainingTime, TimeSpan timeout)
645private static Exception ConvertTransferException(SocketException socketException, TimeSpan timeout, Exception originalException,
700private static Exception ConvertTimeoutErrorException(Exception originalException,
790public static Exception ConvertConnectException(SocketException socketException, Uri remoteUri, TimeSpan timeSpent, Exception innerException)
System.ServiceProcess.ServiceController (1)
System.Speech (4)
System.Text.Json (22)
System.Text.RegularExpressions (1)
System.Text.RegularExpressions.Generator (2)
System.Threading (8)
System.Threading.Channels (26)
System.Threading.RateLimiting (24)
System.Threading.Tasks.Dataflow (142)
Internal\Common.cs (21)
139catch (Exception exception)
150internal static bool IsCooperativeCancellation(Exception exception)
212internal static Exception InitializeStackTrace(Exception exception)
228internal static void StoreDataflowMessageValueIntoExceptionData<T>(Exception exc, T messageValue, bool targetInnerExceptions = false)
254foreach (Exception innerException in aggregate.InnerExceptions)
272private static void StoreStringIntoExceptionData(Exception exception, string key, string value)
300internal static void ThrowAsync(Exception error)
311internal static void AddException([NotNull] ref List<Exception>? list, Exception exception, bool unwrapInnerExceptions = false)
318list ??= new List<Exception>();
362internal static Task<TResult> CreateTaskFromException<TResult>(Exception exception)
452internal static Exception? StartTaskSafe(Task task, TaskScheduler scheduler)
470private static Exception? StartTaskSafeCore(Task task, TaskScheduler scheduler)
475Exception? schedulingException = null;
481catch (Exception caughtException)
499ref List<Exception>? exceptions)
525catch (Exception exc)
538internal static readonly Action<Exception> AsyncExceptionHandler = ThrowAsync;
546internal static void PropagateCompletion(Task sourceCompletionTask, IDataflowBlock target, Action<Exception>? exceptionHandler)
559catch (Exception exc)
System.Threading.Tasks.Parallel (28)
System.Transactions.Local (86)
System\Transactions\TransactionException.cs (24)
22internal static TransactionException Create(string? message, Exception? innerException)
33internal static TransactionException CreateTransactionStateException(Exception? innerException)
38internal static Exception CreateEnlistmentStateException(Exception? innerException, Guid distributedTxId)
52internal static Exception CreateInvalidOperationException(TraceSourceType traceSource, string? message, Exception? innerException)
83public TransactionException(string? message, Exception? innerException) : base(message, innerException)
107internal static TransactionException Create(string? message, Exception? innerException, Guid distributedTxId)
116internal static TransactionException CreateTransactionStateException(Exception? innerException, Guid distributedTxId)
121internal static Exception CreateTransactionCompletedException(Guid distributedTxId)
136internal static Exception CreateInvalidOperationException(TraceSourceType traceSource, string? message, Exception? innerException, Guid distributedTxId)
154internal static new TransactionAbortedException Create(string? message, Exception? innerException, Guid distributedTxId)
163internal static new TransactionAbortedException Create(string? message, Exception? innerException)
193public TransactionAbortedException(string? message, Exception? innerException) : base(message ?? SR.TransactionAborted, innerException)
201internal TransactionAbortedException(Exception? innerException) : base(SR.TransactionAborted, innerException)
205internal TransactionAbortedException(Exception? innerException, Guid distributedTxId) :
231internal static TransactionInDoubtException Create(TraceSourceType traceSource, string? message, Exception? innerException, Guid distributedTxId)
240internal static TransactionInDoubtException Create(TraceSourceType traceSource, string? message, Exception? innerException)
271public TransactionInDoubtException(string? message, Exception? innerException) : base(message ?? SR.TransactionIndoubt, innerException)
294internal static new TransactionManagerCommunicationException Create(string? message, Exception? innerException)
305internal static TransactionManagerCommunicationException Create(Exception? innerException)
332Exception? innerException
373public TransactionPromotionException(string? message, Exception? innerException) : base(message ?? SR.PromotionFailed, innerException)
System\Transactions\TransactionState.cs (31)
190internal virtual void Rollback(InternalTransaction tx, Exception? e)
297internal virtual void ChangeStateTransactionAborted(InternalTransaction tx, Exception? e)
695internal override void Rollback(InternalTransaction tx, Exception? e)
838internal override void Rollback(InternalTransaction tx, Exception? e)
1037internal override void Rollback(InternalTransaction tx, Exception? e)
1150internal override void ChangeStateTransactionAborted(InternalTransaction tx, Exception? e)
1219internal override void Rollback(InternalTransaction tx, Exception? e)
1224internal override void ChangeStateTransactionAborted(InternalTransaction tx, Exception? e)
1285internal override void ChangeStateTransactionAborted(InternalTransaction tx, Exception? e)
1329internal override void ChangeStateTransactionAborted(InternalTransaction tx, Exception? e)
1423internal override void Rollback(InternalTransaction tx, Exception? e)
1461internal override void ChangeStateTransactionAborted(InternalTransaction tx, Exception? e)
1555internal override void Rollback(InternalTransaction tx, Exception? e)
1618internal override void Rollback(InternalTransaction tx, Exception? e)
1801internal override void Rollback(InternalTransaction tx, Exception? e)
2445internal override void ChangeStateTransactionAborted(InternalTransaction tx, Exception? e)
2558internal override void ChangeStateTransactionAborted(InternalTransaction tx, Exception? e)
2632internal override void ChangeStateTransactionAborted(InternalTransaction tx, Exception? e)
2735internal override void ChangeStateTransactionAborted(InternalTransaction tx, Exception? e)
2960internal override void Rollback(InternalTransaction tx, Exception? e)
3018internal override void ChangeStateTransactionAborted(InternalTransaction tx, Exception? e)
3379internal override void Rollback(InternalTransaction tx, Exception? e)
3489internal override void Rollback(InternalTransaction tx, Exception? e)
3580internal override void ChangeStateTransactionAborted(InternalTransaction tx, Exception? e)
3686internal override void Rollback(InternalTransaction tx, Exception? e)
3782internal override void Rollback(InternalTransaction tx, Exception? e)
3866internal override void Rollback(InternalTransaction tx, Exception? e)
3884internal override void ChangeStateTransactionAborted(InternalTransaction tx, Exception? e)
4062internal override void Rollback(InternalTransaction tx, Exception? e)
4092internal override void ChangeStateTransactionAborted(InternalTransaction tx, Exception? e)
4300internal override void Rollback(InternalTransaction tx, Exception? e)
System.Windows.Forms (232)
System\Windows\Forms\ComponentModel\COM2Interop\Com2IPerPropertyBrowsingHandler.Com2IPerPropertyBrowsingEnum.cs (1)
149catch (Exception ex)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\ImmutablePropertyDescriptorGridEntry.cs (1)
74catch (Exception e)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\MultiPropertyDescriptorGridEntry.cs (1)
145catch (Exception e)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.cs (1)
207catch (Exception e)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.ExceptionConverter.cs (1)
20if (value is Exception ex)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.ExceptionEditor.cs (1)
19if (value is Exception ex)
System.Windows.Forms.Analyzers.CSharp (1)
System.Windows.Forms.Design (122)
System.Windows.Forms.Design.Tests (11)
System.Windows.Forms.IntegrationTests.Common (1)
System.Windows.Forms.Primitives (3)
System.Windows.Forms.Primitives.Tests (3)
System.Windows.Forms.Primitives.TestUtilities (22)
System.Windows.Forms.Tests (28)
System.Windows.Forms.TestUtilities (2)
System.Windows.Forms.UI.IntegrationTests (7)
System.Windows.Input.Manipulations (12)
System.Xaml (53)
System\Xaml\XamlException.cs (9)
15public XamlException(string message, Exception innerException, int lineNumber, int linePosition)
22public XamlException(string message, Exception innerException)
108public XamlParseException(string message, Exception innerException)
130public XamlObjectWriterException(string message, Exception innerException)
156public XamlDuplicateMemberException(string message, Exception innerException)
192public XamlInternalException(string message, Exception innerException)
209public XamlSchemaException(string message, Exception innerException)
228public XamlObjectReaderException(string message, Exception innerException)
251public XamlXmlWriterException(string message, Exception innerException)
System.Xaml.Tests (9)
TaskUsageLogger (2)
Templates.Blazor.Tests (30)
Templates.Blazor.WebAssembly.Auth.Tests (39)
Templates.Blazor.WebAssembly.Tests (39)
Templates.Mvc.Tests (39)
Templates.Tests (39)
TestDiscoveryWorker (1)
TestProject.IntegrationServiceA (4)
UIAutomationClient (14)
UIAutomationClientSideProviders (35)
UIAutomationTypes (5)
UnitTests.Common (3)
vbc (17)
VBCSCompiler (33)
VisualBasicRuntimeTest (1)
Wasm.Performance.ConsoleHost (1)
Wasm.Performance.Driver (1)
WindowsBase.Tests (17)
System\Windows\Data\DataSourceProviderTests.cs (8)
1456var error = new Exception();
1534var error = new Exception();
1664var error1 = new Exception();
1667var error2 = new Exception();
1887public new void OnQueryFinished(object newData, Exception error, DispatcherOperationCallback completionWork, object callbackArguments) => base.OnQueryFinished(newData, error, completionWork, callbackArguments);
1921public Action<object, Exception, DispatcherOperationCallback, object>? OnQueryFinishedAction { get; set; }
1923protected override void OnQueryFinished(object newData, Exception error, DispatcherOperationCallback completionWork, object callbackArguments)
1964public new void OnQueryFinished(object newData, Exception error, DispatcherOperationCallback completionWork, object callbackArguments) => base.OnQueryFinished(newData, error, completionWork, callbackArguments);
WindowsFormsIntegration (6)
WinFormsControlsTest (3)
XmlFileLogger (1)
xunit.assert (70)
CollectionAsserts.cs (8)
73 var errors = new List<Tuple<int, string, Exception>>();
82 catch (Exception ex)
84 errors.Add(new Tuple<int, string, Exception>(idx, ArgumentFormatter.Format(item), ex));
127 var errors = new List<Tuple<int, string, Exception>>();
136 catch (Exception ex)
138 errors.Add(new Tuple<int, string, Exception>(idx, ArgumentFormatter.Format(item), ex));
174 catch (Exception ex)
215 catch (Exception ex)
xunit.console (5)
common\AssemblyResolution\Microsoft.DotNet.PlatformAbstractions\Native\NativeMethods.Darwin.cs (1)
38catch (Exception ex)