Archive

Archive for December, 2005

Looking for the right exception?

December 16th, 2005

This is mostly for my own reference; I am usually looking for the right exception to throw so here is a single list with everything deriving from System.Exception nicely nested and linked:

System.Object
   System.Exception
      System.ApplicationException
         System.Reflection.InvalidFilterCriteriaException
         System.Reflection.TargetException
         System.Reflection.TargetInvocationException
         System.Reflection.TargetParameterCountException
      System.IO.IsolatedStorage.IsolatedStorageException
      System.Runtime.Remoting.MetadataServices.SUDSGeneratorException
      System.Runtime.Remoting.MetadataServices.SUDSParserException
      System.SystemException
         System.AppDomainUnloadedException
         System.ArgumentException
            System.ArgumentNullException
            System.ArgumentOutOfRangeException
            System.ComponentModel.InvalidEnumArgumentException
            System.DuplicateWaitObjectException
         System.ArithmeticException
            System.DivideByZeroException
            System.NotFiniteNumberException
            System.OverflowException
         System.ArrayTypeMismatchException
         System.BadImageFormatException
         System.CannotUnloadAppDomainException
         System.ComponentModel.Design.Serialization.CodeDomSerializerException
         System.ComponentModel.LicenseException
         System.ComponentModel.WarningException
         System.Configuration.ConfigurationException
         System.Configuration.Install.InstallException
         System.ContextMarshalException
         System.Data.DataException
            System.Data.ConstraintException
            System.Data.DeletedRowInaccessibleException
            System.Data.DuplicateNameException
            System.Data.InRowChangingEventException
            System.Data.InvalidConstraintException
            System.Data.InvalidExpressionException
               System.Data.EvaluateException
               System.Data.SyntaxErrorException
            System.Data.MissingPrimaryKeyException
            System.Data.NoNullAllowedException
            System.Data.ReadOnlyException
            System.Data.RowNotInTableException
            System.Data.StrongTypingException
            System.Data.TypedDataSetGeneratorException
            System.Data.VersionNotFoundException
         System.Data.DBConcurrencyException
         System.Data.Odbc.OdbcException
         System.Data.OracleClient.OracleException
         System.Data.SqlClient.SqlException
         System.Data.SqlServerCe.SqlCeException
         System.Data.SqlTypes.SqlTypeException
            System.Data.SqlTypes.SqlNullValueException
            System.Data.SqlTypes.SqlTruncateException
         System.Drawing.Printing.InvalidPrinterException
         System.EnterpriseServices.RegistrationException
         System.EnterpriseServices.ServicedComponentException
         System.ExecutionEngineException
         System.FormatException
            System.Net.CookieException
            System.Reflection.CustomAttributeFormatException
            System.UriFormatException
         System.IndexOutOfRangeException
         System.InvalidCastException
         System.InvalidOperationException
            System.Net.ProtocolViolationException
            System.Net.WebException
            System.ObjectDisposedException
         System.InvalidProgramException
         System.IO.InternalBufferOverflowException
         System.IO.IOException
            System.IO.DirectoryNotFoundException
            System.IO.EndOfStreamException
            System.IO.FileLoadException
            System.IO.FileNotFoundException
            System.IO.PathTooLongException
         System.Management.ManagementException
         System.MemberAccessException
            System.FieldAccessException
            System.MethodAccessException
            System.MissingMemberException
               System.MissingFieldException
               System.MissingMethodException
         System.MulticastNotSupportedException
         System.NotImplementedException
         System.NotSupportedException
            System.PlatformNotSupportedException
         System.NullReferenceException
         System.OutOfMemoryException
         System.RankException
         System.Reflection.AmbiguousMatchException
         System.Reflection.ReflectionTypeLoadException
         System.Resources.MissingManifestResourceException
         System.Runtime.InteropServices.ExternalException
            System.ComponentModel.Design.CheckoutException
            System.ComponentModel.Win32Exception
               System.Net.Sockets.SocketException
            System.Data.OleDb.OleDbException
            System.Messaging.MessageQueueException
            System.Runtime.InteropServices.COMException
            System.Runtime.InteropServices.SEHException
            System.Web.HttpException
               System.Web.HttpCompileException
               System.Web.HttpParseException
               System.Web.HttpRequestValidationException
         System.Runtime.InteropServices.InvalidComObjectException
         System.Runtime.InteropServices.InvalidOleVariantTypeException
         System.Runtime.InteropServices.MarshalDirectiveException
         System.Runtime.InteropServices.SafeArrayRankMismatchException
         System.Runtime.InteropServices.SafeArrayTypeMismatchException
         System.Runtime.Remoting.RemotingException
            System.Runtime.Remoting.RemotingTimeoutException
         System.Runtime.Remoting.ServerException
         System.Runtime.Serialization.SerializationException
         System.Security.Cryptography.CryptographicException
            System.Security.Cryptography.CryptographicUnexpectedOperationException
         System.Security.Policy.PolicyException
         System.Security.SecurityException
         System.Security.VerificationException
         System.Security.XmlSyntaxException
         System.ServiceProcess.TimeoutException
         System.StackOverflowException
         System.Threading.SynchronizationLockException
         System.Threading.ThreadAbortException
         System.Threading.ThreadInterruptedException
         System.Threading.ThreadStateException
         System.TypeInitializationException
         System.TypeLoadException
            System.DllNotFoundException
            System.EntryPointNotFoundException
         System.TypeUnloadedException
         System.UnauthorizedAccessException
         System.Web.Services.Protocols.SoapException
            System.Web.Services.Protocols.SoapHeaderException
         System.Xml.Schema.XmlSchemaException
         System.Xml.XmlException
         System.Xml.XPath.XPathException
         System.Xml.Xsl.XsltException
            System.Xml.Xsl.XsltCompileException
      System.Windows.Forms.AxHost.InvalidActiveXStateException

.NET