System Exception Class in C#

In this article I am trying to explain all system exception class in C#.

 Microsoft.SqlServer.Server.InvalidUdtException

 Thrown when SQL Server or the ADO.NET System.Data.SqlClient provider detects an invalid user-defined type (UDT).

  System.AccessViolationException

  The exception that is thrown when there is an attempt to read or write protected memory.

 System.Activities.ValidationException

 The exception that is thrown when a workflow or activity is in an invalid state.

  System.AppDomainUnloadedException

 The exception that is thrown when an attempt is made to access an unloaded application domain.

 System.ArgumentException

 The exception that is thrown when one of the arguments provided to a method is not valid.

  System.ArithmeticException

  The exception that is thrown for errors in an arithmetic, casting, or conversion operation.

System.ArrayTypeMismatchException

  The exception that is thrown when an attempt is made to store an element of the wrong type within an array.

  System.BadImageFormatException

  The exception that is thrown when the file image of a dynamic link library (DLL) or an executable program is invalid.

  System.CannotUnloadAppDomainException

  The exception that is thrown when an attempt to unload an application domain fails.

  System.Collections.Generic.KeyNotFoundException

  The exception that is thrown when the key specified for accessing an element in a collection does not match any key in the collection.

  System.ComponentModel.Design.Serialization.CodeDomSerializerException

  The exception that is thrown when line number information is available for a serialization error.

System.ComponentModel.LicenseException

  Represents the exception thrown when a component cannot be granted a license.

 System.ComponentModel.WarningException

  Specifies an exception that is handled as a warning instead of an error.

  System.Configuration.ConfigurationException

  The exception that is thrown when a configuration system error has occurred.

  System.Configuration.Install.InstallException

 The exception that is thrown when an error occurs during the commit, rollback, or uninstall phase of an installation.

  System.ContextMarshalException

  The exception that is thrown when an attempt to marshal an object across a context boundary fails.

 System.Data.DataException

  Represents the exception that is thrown when errors are generated using ADO.NET components.

 System.Data.DBConcurrencyException

  The exception that is thrown by the DataAdapter during an insert, update, or delete operation if the number of rows affected equals zero.

  System.Data.OperationAbortedException

  This exception is thrown when an ongoing operation is aborted by the user.

  System.Data.SqlTypes.SqlTypeException

The base exception class for the System.Data.SqlTypes.

  System.DataMisalignedException

  The exception that is thrown when a unit of data is read from or written to an address that is not a multiple of the data size. This class cannot be inherited.

  System.Deployment.Application.DeploymentException

  Defines a base class for all deployment-related exceptions.

  System.DirectoryServices.AccountManagement.PrincipalException

  The base class of exceptions thrown by System.DirectoryServices.AccountManagement objects.

  System.Drawing.Printing.InvalidPrinterException

  Represents the exception that is thrown when you try to access a printer using printer settings that are not valid.

  System.EnterpriseServices.RegistrationException

  The exception that is thrown when a registration error is detected.

  System.EnterpriseServices.ServicedComponentException

  The exception that is thrown when an error is detected in a serviced component.

  System.ExecutionEngineException

  The exception that is thrown when there is an internal error in the execution engine of the common language runtime. This class cannot be inherited.

  System.FormatException

  The exception that is thrown when the format of an argument does not meet the parameter specifications of the invoked method.

  System.IdentityModel.LimitExceededException

 The exception that is thrown when a configured limit or quota is exceeded.

  System.IdentityModel.SecurityMessageSerializationException

  The exception that is thrown when an error occurs while serializing a security message.

  System.IdentityModel.Tokens.SecurityTokenException

  The exception that is thrown when a problem occurs while processing a security token.

  System.IndexOutOfRangeException

  The exception that is thrown when an attempt is made to access an element of an array with an index that is outside the bounds of the array. This class cannot be inherited.

  System.InsufficientExecutionStackException

  The exception that is thrown when there is insufficient execution stack available to allow most methods to execute.

  System.InvalidCastException

  The exception that is thrown for invalid casting or explicit conversion.

 System.InvalidOperationException

  The exception that is thrown when a method call is invalid for the object's current state.

  System.InvalidProgramException

  The exception that is thrown when a program contains invalid Microsoft intermediate language (MSIL) or metadata. Generally this indicates a bug in the compiler that generated the program.

 System.IO.InternalBufferOverflowException

 The exception thrown when the internal buffer overflows.

  System.IO.InvalidDataException

  The exception that is thrown when a data stream is in an invalid format.

  System.IO.IOException

  The exception that is thrown when an I/O error occurs.

  System.Management.ManagementException

  Represents management exceptions.

System.MemberAccessException

  The exception that is thrown when an attempt to access a class member fails.

  System.MulticastNotSupportedException

  The exception that is thrown when there is an attempt to combine two delegates based on the Delegate type instead of the MulticastDelegate type. This class cannot be inherited

  System.NotImplementedException

  The exception that is thrown when a requested method or operation is not implemented.

  System.NotSupportedException

  The exception that is thrown when an invoked method is not supported, or when there is an attempt to read, seek, or write to a stream that does not support the invoked functionality.

 System.NullReferenceException

  The exception that is thrown when there is an attempt to dereference a null object reference.

  System.OperationCanceledException

  The exception that is thrown in a thread upon cancellation of an operation that the thread was executing.

  System.OutOfMemoryException

  The exception that is thrown when there is not enough memory to continue the execution of a program.

  System.Printing.PrintSystemException

  The exception that occurs when an error condition prevents accessing or creating a PrintSystemObject.

  System.RankException

  The exception that is thrown when an array with the wrong number of dimensions is passed to a method.

  System.Reflection.AmbiguousMatchException

  The exception that is thrown when binding to a member results in more than one member matching the binding criteria. This class cannot be inherited.

  System.Reflection.ReflectionTypeLoadException

  The exception that is thrown by the Module.GetTypes method if any of the classes in a module cannot be loaded. This class cannot be inherited.

  System.Resources.MissingManifestResourceException

  The exception that is thrown if the main assembly does not contain the resources for the neutral culture, and an appropriate satellite assembly is missing.

  System.Resources.MissingSatelliteAssemblyException

  The exception that is thrown when the satellite assembly for the resources of the default culture is missing.

  System.Runtime.InteropServices.ExternalException

  The base exception type for all COM interop exceptions and structured exception handling (SEH) exceptions.

  System.Runtime.InteropServices.InvalidComObjectException

  The exception thrown when an invalid COM object is used.

  System.Runtime.InteropServices.InvalidOleVariantTypeException

  The exception thrown by the marshaler when it encounters an argument of a variant type that can not be marshaled to managed code.

  System.Runtime.InteropServices.MarshalDirectiveException

  The exception that is thrown by the marshaler when it encounters a MarshalAsAttribute it does not support.

  System.Runtime.InteropServices.SafeArrayRankMismatchException

  The exception thrown when the rank of an incoming SAFEARRAY does not match the rank specified in the managed signature.

  System.Runtime.InteropServices.SafeArrayTypeMismatchException

  The exception thrown when the type of the incoming SAFEARRAY does not match the type specified in the managed signature.

  System.Runtime.Remoting.RemotingException

  The exception that is thrown when something has gone wrong during remoting.

 System.Runtime.Remoting.ServerException

  The exception that is thrown to communicate errors to the client when the client connects to non-.NET Framework applications that cannot throw exceptions.

  System.Runtime.Serialization.SerializationException

  The exception thrown when an error occurs during serialization or deserialization.

  System.Security.Authentication.AuthenticationException

  The exception that is thrown when authentication fails for an authentication stream.

  System.Security.Cryptography.CryptographicException

  The exception that is thrown when an error occurs during a cryptographic operation.

  System.Security.HostProtectionException

 The exception that is thrown when a denied host resource is detected.

 System.Security.Policy.PolicyException

  The exception that is thrown when policy forbids code to run.

  System.Security.Principal.IdentityNotMappedException

  Represents an exception for a principal whose identity could not be mapped to a known identity.

  System.Security.SecurityException

  The exception that is thrown when a security error is detected.

  System.Security.VerificationException

  The exception that is thrown when the security policy requires code to be type safe and the verification process is unable to verify that the code is type safe.

  System.Security.XmlSyntaxException

  The exception that is thrown when there is a syntax error in XML parsing. This class cannot be inherited.

  System.ServiceModel.CommunicationException

  Represents a communication error in either the service or client application.

  System.ServiceModel.Dispatcher.InvalidBodyAccessException

  An abstract base class for the exceptions that are thrown if an attempt is made to access the body of a message when it is not allowed.

  System.ServiceModel.Dispatcher.MultipleFilterMatchesException

  The exception that is thrown when multiple filters match, but only one was expected.

  System.ServiceModel.InvalidMessageContractException

  Represents a message contract that is not valid.

  System.ServiceModel.QuotaExceededException

  The exception that is thrown when a message quota has been exceeded.

  System.ServiceProcess.TimeoutException

  The exception that is thrown when a specified timeout has expired.

  System.StackOverflowException

  The exception that is thrown when the execution stack overflows because it contains too many nested method calls. This class cannot be inherited.

  System.Threading.AbandonedMutexException

  The exception that is thrown when one thread acquires a Mutex object that another thread has abandoned by exiting without releasing it.

  System.Threading.SemaphoreFullException

  The exception that is thrown when the Semaphore.Release method is called on a semaphore whose count is already at the maximum.

  System.Threading.SynchronizationLockException

  The exception that is thrown when a method requires the caller to own the lock on a given Monitor, and the method is invoked by a caller that does not own that lock.

  System.Threading.ThreadAbortException

  The exception that is thrown when a call is made to the Abort method. This class cannot be inherited.

  System.Threading.ThreadInterruptedException

  The exception that is thrown when a Thread is interrupted while it is in a waiting state.

  System.Threading.ThreadStartException

  The exception that is thrown when a failure occurs in a managed thread after the underlying operating system thread has been started, but before the thread is ready to execute user code.

  System.Threading.ThreadStateException

  The exception that is thrown when a Thread is in an invalid ThreadState for the method call.

  System.TimeoutException

  The exception that is thrown when the time allotted for a process or operation has expired.

  System.Transactions.TransactionException

  The exception that is thrown when you attempt to do work on a transaction that cannot accept new work.

  System.TypeInitializationException

  The exception that is thrown as a wrapper around the exception thrown by the class initializer. This class cannot be inherited.

  System.TypeLoadException

  The exception that is thrown when type-loading failures occur.

  System.TypeUnloadedException

  The exception that is thrown when there is an attempt to access an unloaded class.

  System.UnauthorizedAccessException

  The exception that is thrown when the operating system denies access because of an I/O error or a specific type of security error.

  System.UriTemplateMatchException

  Represents an error when matching a Uri to a UriTemplateTable.

  System.Web.Caching.DatabaseNotEnabledForNotificationException

  The exception that is thrown when a SQL Server database is not enabled to support dependencies associated with the SqlCacheDependency class. This class cannot be inherited.

  System.Web.Caching.TableNotEnabledForNotificationException

  The exception that is thrown when a SqlCacheDependency class is used against a database table that is not enabled for change notifications.

  System.Web.Management.SqlExecutionException

  Defines a class for SQL execution exceptions in the System.Web.Management namespace.

  System.Web.Services.Protocols.SoapException

  Represents the exception that is thrown when an XML Web service method is called over SOAP and an exception occurs.

  System.Windows.Automation.ElementNotAvailableException

  Contains information about the exception that is raised when an attempt is made to access an UI Automation element corresponding to a part of the user interface that is no longer available.

  System.Windows.Data.ValueUnavailableException

  The exception that is thrown by the BindingGroup.GetValue(Object, String) method when the value is not available.

  System.Windows.Markup.XamlParseException

  Represents the exception class for parser-specific exceptions from a WPF XAML parser. This exception is used in XAML API or WPF XAML parser operations from .NET Framework 3.0 and .NET Framework 3.5, or for specific use of the WPF XAML parser by calling System.Windows.Markup.XamlReader API.

  System.Windows.Media.Animation.AnimationException

  The exception that is thrown when an error occurs while animating a property.

  System.Windows.Media.InvalidWmpVersionException

  The exception that is thrown when the installed Microsoft Windows Media Player version is not supported.

  System.Workflow.Activities.EventDeliveryFailedException

  The exception that is thrown when an event that is raised from the host cannot be delivered to the workflow instance. Typically the event is raised from an ExternalDataExchangeService on a workflow instance. This class cannot be inherited.

  System.Workflow.Activities.WorkflowAuthorizationException

  The exception that is thrown when role validation fails due to a specified identity that is not contained in the WorkflowRoleCollection.

  System.Workflow.Runtime.Hosting.PersistenceException

  The exception that is thrown when the persistence service cannot fulfill a request.

  System.Workflow.Runtime.TrackingTrackingProfileDeserializationException

  The exception that is thrown when an XML document cannot be deserialized into a TrackingProfile by a TrackingProfileSerializer.

  System.Xml.Schema.XmlSchemaException

  Returns detailed information about the schema exception.

  System.Xml.XmlException

  Returns detailed information about the last exception.

  System.Xml.XPath.XPathException

  Provides the exception thrown when an error occurs while processing an XPath expression.

  System.Xml.Xsl.XsltException

   The exception that is thrown when an error occurs while processing an XSLT transformation.


  Modified On Nov-30-2017 03:14:40 AM

Leave Comment