-
Notifications
You must be signed in to change notification settings - Fork 12
Unthrowable Exceptions
Michael Damatov edited this page Nov 9, 2025
·
8 revisions
The analyzer discourages throwing of some .NET Framework exceptions.
System.ApplicationExceptionSystem.ComponentModel.WarningExceptionSystem.Data.EntityExceptionSystem.Data.SqlTypes.SqlTypeExceptionSystem.Data.TypedDataSetGeneratorExceptionSystem.DirectoryServices.AccountManagement.PrincipalExceptionSystem.DirectoryServices.Protocols.DirectoryExceptionSystem.ExceptionSystem.IdentityModel.RequestExceptionSystem.IdentityModel.Services.FederationExceptionSystem.Management.Instrumentation.InstrumentationBaseExceptionSystem.Net.Http.HttpRequestExceptionSystem.Runtime.DurableInstancing.InstancePersistenceExceptionSystem.SystemException
Microsoft.JScript.BreakOutOfFinallyMicrosoft.JScript.CmdLineExceptionMicrosoft.JScript.ContinueOutOfFinallyMicrosoft.JScript.EndOfFileMicrosoft.JScript.JScriptExceptionMicrosoft.JScript.NoContextExceptionMicrosoft.JScript.ParserExceptionMicrosoft.JScript.ReturnOutOfFinallyMicrosoft.VisualBasic.CompilerServices.IncompleteInitializationMicrosoft.VisualBasic.CompilerServices.InternalErrorExceptionSystem.Net.Mail.SmtpFailedRecipientsException
System.Configuration.ConfigurationErrorsExceptionSystem.Configuration.ConfigurationExceptionSystem.Configuration.Provider.ProviderExceptionSystem.Configuration.SettingsPropertyIsReadOnlyExceptionSystem.Configuration.SettingsPropertyNotFoundExceptionSystem.Configuration.SettingsPropertyWrongTypeException
System.Data.DataExceptionSystem.Data.Odbc.OdbcExceptionSystem.Data.OleDb.OleDbExceptionSystem.Data.OracleClient.OracleExceptionSystem.Data.SqlClient.SqlException
System.Deployment.Application.CompatibleFrameworkMissingExceptionSystem.Deployment.Application.DependentPlatformMissingExceptionSystem.Deployment.Application.DeploymentDownloadExceptionSystem.Deployment.Application.DeploymentExceptionSystem.Deployment.Application.InvalidDeploymentExceptionSystem.Deployment.Application.SupportedRuntimeMissingExceptionSystem.Deployment.Application.TrustNotGrantedException
Microsoft.CSharp.RuntimeBinder.RuntimeBinderExceptionMicrosoft.CSharp.RuntimeBinder.RuntimeBinderInternalCompilerExceptionSystem.AccessViolationExceptionSystem.AppDomainUnloadedExceptionSystem.ArrayTypeMismatchExceptionSystem.BadImageFormatExceptionSystem.CannotUnloadAppDomainExceptionSystem.ContextMarshalExceptionSystem.DataMisalignedExceptionSystem.DllNotFoundExceptionSystem.EntryPointNotFoundExceptionSystem.ExecutionEngineExceptionSystem.FieldAccessExceptionSystem.IndexOutOfRangeExceptionSystem.InsufficientExecutionStackExceptionSystem.InsufficientMemoryExceptionSystem.InvalidProgramExceptionSystem.IO.FileLoadExceptionSystem.MemberAccessExceptionSystem.MethodAccessExceptionSystem.MissingFieldExceptionSystem.MissingMemberExceptionSystem.MissingMethodExceptionSystem.MulticastNotSupportedExceptionSystem.NullReferenceExceptionSystem.OutOfMemoryExceptionSystem.RankExceptionSystem.Resources.MissingManifestResourceExceptionSystem.Resources.MissingSatelliteAssemblyExceptionSystem.Runtime.AmbiguousImplementationExceptionSystem.Runtime.CompilerServices.RuntimeWrappedExceptionSystem.Runtime.CompilerServices.SwitchExpressionExceptionSystem.Runtime.InteropServices.COMExceptionSystem.Runtime.InteropServices.ExternalExceptionSystem.Runtime.InteropServices.InvalidComObjectExceptionSystem.Runtime.InteropServices.InvalidOleVariantTypeExceptionSystem.Runtime.InteropServices.MarshalDirectiveExceptionSystem.Runtime.InteropServices.SafeArrayRankMismatchExceptionSystem.Runtime.InteropServices.SEHExceptionSystem.Security.HostProtectionExceptionSystem.StackOverflowExceptionSystem.Threading.BarrierPostPhaseExceptionSystem.Threading.ThreadAbortExceptionSystem.Threading.ThreadInterruptedExceptionSystem.Threading.ThreadStartExceptionSystem.Threading.ThreadStateExceptionSystem.TypeAccessExceptionSystem.TypeInitializationExceptionSystem.TypeLoadExceptionSystem.TypeUnloadedException
System.IO.Compression.ZLibException
System.ComponentModel.Composition.ChangeRejectedExceptionSystem.ComponentModel.Composition.CompositionContractMismatchExceptionSystem.ComponentModel.Composition.CompositionExceptionSystem.ComponentModel.Composition.ImportCardinalityMismatchExceptionSystem.ComponentModel.Composition.Primitives.ComposablePartException
System.Messaging.MessageQueueException
Microsoft.Build.BuildEngine.InternalLoggerExceptionMicrosoft.Build.BuildEngine.RemoteErrorExceptionMicrosoft.Build.Exceptions.InternalLoggerException
System.Reflection.AmbiguousMatchExceptionSystem.Reflection.ReflectionTypeLoadExceptionSystem.Reflection.TargetExceptionSystem.Reflection.TargetInvocationExceptionSystem.Reflection.TargetParameterCountException
System.Runtime.Remoting.MetadataServices.SUDSGeneratorExceptionSystem.Runtime.Remoting.MetadataServices.SUDSParserException
Microsoft.SqlServer.Server.InvalidUdtException
System.AggregateException
System.IdentityModel.Selectors.CardSpaceException
System.Windows.Markup.XamlParseExceptionSystem.Windows.Media.Animation.AnimationException
Microsoft.UI.Xaml.Automation.ElementNotAvailableExceptionMicrosoft.UI.Xaml.Automation.ElementNotEnabledExceptionMicrosoft.UI.Xaml.LayoutCycleExceptionMicrosoft.UI.Xaml.Markup.XamlParseExceptionWindows.UI.Xaml.Automation.ElementNotAvailableExceptionWindows.UI.Xaml.Automation.ElementNotEnabledExceptionWindows.UI.Xaml.LayoutCycleExceptionWindows.UI.Xaml.Markup.XamlParseException
System.ComponentModel.Design.ExceptionCollection
Note
Please feel free to raise an issue if you mean that some exceptions are missing or were incorrectly put in the list.
Note
The analyzer can be configured or deactivated in the ReSharper Options or Rider Settings dialog.