Uncatchable Exceptions - prodot/ReCommended-Extension GitHub Wiki
The analyzer discourages catching of some .NET Framework exceptions.
System.Security.HostProtectionException
System.AccessViolationExceptionSystem.AppDomainUnloadedExceptionSystem.ArgumentExceptionSystem.ArgumentNullExceptionSystem.ArgumentOutOfRangeExceptionSystem.ArrayTypeMismatchExceptionSystem.Collections.Generic.KeyNotFoundExceptionSystem.ComponentModel.InvalidEnumArgumentExceptionSystem.Configuration.SettingsPropertyIsReadOnlyExceptionSystem.Configuration.SettingsPropertyNotFoundExceptionSystem.Configuration.SettingsPropertyWrongTypeExceptionSystem.Data.DeletedRowInaccessibleExceptionSystem.Data.EvaluateExceptionSystem.Data.InRowChangingEventExceptionSystem.Data.InvalidConstraintExceptionSystem.Data.InvalidExpressionExceptionSystem.Data.MissingPrimaryKeyExceptionSystem.Data.NoNullAllowedExceptionSystem.Data.ReadOnlyExceptionSystem.Data.RowNotInTableExceptionSystem.Data.StrongTypingExceptionSystem.Data.SyntaxErrorExceptionSystem.Data.VersionNotFoundExceptionSystem.Diagnostics.Contracts.ContractExceptionSystem.Diagnostics.UnreachableExceptionSystem.DuplicateWaitObjectExceptionSystem.FieldAccessExceptionSystem.IndexOutOfRangeExceptionSystem.InvalidCastExceptionSystem.MemberAccessExceptionSystem.MethodAccessExceptionSystem.MissingFieldExceptionSystem.MissingMemberExceptionSystem.MissingMethodExceptionSystem.MulticastNotSupportedExceptionSystem.NotImplementedExceptionSystem.NotSupportedExceptionSystem.NullReferenceExceptionSystem.ObjectDisposedExceptionSystem.PlatformNotSupportedExceptionSystem.RankExceptionSystem.Runtime.AmbiguousImplementationExceptionSystem.Runtime.CompilerServices.SwitchExpressionExceptionSystem.Runtime.InteropServices.InvalidComObjectExceptionSystem.Runtime.InteropServices.InvalidOleVariantTypeExceptionSystem.Runtime.InteropServices.MarshalDirectiveExceptionSystem.Runtime.InteropServices.SafeArrayRankMismatchExceptionSystem.Threading.ThreadAbortExceptionSystem.Windows.Automation.ElementNotEnabledExceptionSystem.Windows.ResourceReferenceKeyNotFoundException
System.OutOfMemoryExceptionSystem.StackOverflowException
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
Note
Not all .NET APIs are made consistently. For example, the Process.GetProcessById method throws an ArgumentException, which cannot be avoided in any way. In such a case the warning should just be suppressed.
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.