Home > DeveloperSection > Articles > System Exception Class in C#

System Exception Class in C#


C# C# 
Ratings:
0 Comment(s)
 4980  View(s)
Rate this:

 

System Exception Class in C#

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

v  Microsoft.SqlServer.Server.InvalidUdtException

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

v  System.AccessViolationException

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

v  System.Activities.ValidationException

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

v  System.AppDomainUnloadedException

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

v  System.ArgumentException

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

v  System.ArithmeticException

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

v  System.ArrayTypeMismatchException

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

v  System.BadImageFormatException

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

v  System.CannotUnloadAppDomainException

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

v  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.

v  System.ComponentModel.Design.Serialization.CodeDomSerializerException

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

v  System.ComponentModel.LicenseException

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

v  System.ComponentModel.WarningException

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

v  System.Configuration.ConfigurationException

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

v  System.Configuration.Install.InstallException

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

v  System.ContextMarshalException

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

v  System.Data.DataException

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

v  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.

v  System.Data.OperationAbortedException

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

v  System.Data.SqlTypes.SqlTypeException

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

v  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.

v  System.Deployment.Application.DeploymentException

Ø  Defines a base class for all deployment-related exceptions.

v  System.DirectoryServices.AccountManagement.PrincipalException

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

v  System.Drawing.Printing.InvalidPrinterException

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

v  System.EnterpriseServices.RegistrationException

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

v  System.EnterpriseServices.ServicedComponentException

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

v  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.

v  System.FormatException

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

v  System.IdentityModel.LimitExceededException

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

v  System.IdentityModel.SecurityMessageSerializationException

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

v  System.IdentityModel.Tokens.SecurityTokenException

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

v  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.

v  System.InsufficientExecutionStackException

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

v  System.InvalidCastException

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

v  System.InvalidOperationException

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

v  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.

v  System.IO.InternalBufferOverflowException

Ø  The exception thrown when the internal buffer overflows.

v  System.IO.InvalidDataException

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

v  System.IO.IOException

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

v  System.Management.ManagementException

Ø  Represents management exceptions.

v  System.MemberAccessException

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

v  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

v  System.NotImplementedException

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

v  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.

v  System.NullReferenceException

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

v  System.OperationCanceledException

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

v  System.OutOfMemoryException

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

v  System.Printing.PrintSystemException

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

v  System.RankException

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

v  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.

v  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.

v  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.

v  System.Resources.MissingSatelliteAssemblyException

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

v  System.Runtime.InteropServices.ExternalException

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

v  System.Runtime.InteropServices.InvalidComObjectException

Ø  The exception thrown when an invalid COM object is used.

v  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.

v  System.Runtime.InteropServices.MarshalDirectiveException

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

v  System.Runtime.InteropServices.SafeArrayRankMismatchException

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

v  System.Runtime.InteropServices.SafeArrayTypeMismatchException

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

v  System.Runtime.Remoting.RemotingException

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

v  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.

v  System.Runtime.Serialization.SerializationException

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

v  System.Security.Authentication.AuthenticationException

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

v  System.Security.Cryptography.CryptographicException

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

v  System.Security.HostProtectionException

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

v  System.Security.Policy.PolicyException

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

v  System.Security.Principal.IdentityNotMappedException

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

v  System.Security.SecurityException

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

v  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.

v  System.Security.XmlSyntaxException

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

v  System.ServiceModel.CommunicationException

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

v  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.

v  System.ServiceModel.Dispatcher.MultipleFilterMatchesException

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

v  System.ServiceModel.InvalidMessageContractException

Ø  Represents a message contract that is not valid.

v  System.ServiceModel.QuotaExceededException

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

v  System.ServiceProcess.TimeoutException

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

v  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.

v  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.

v  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.

v  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.

v  System.Threading.ThreadAbortException

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

v  System.Threading.ThreadInterruptedException

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

v  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.

v  System.Threading.ThreadStateException

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

v  System.TimeoutException

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

v  System.Transactions.TransactionException

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

v  System.TypeInitializationException

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

v  System.TypeLoadException

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

v  System.TypeUnloadedException

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

v  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.

v  System.UriTemplateMatchException

Ø  Represents an error when matching a Uri to a UriTemplateTable.

v  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.

v  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.

v  System.Web.Management.SqlExecutionException

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

v  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.

v  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.

v  System.Windows.Data.ValueUnavailableException

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

v  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.

v  System.Windows.Media.Animation.AnimationException

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

v  System.Windows.Media.InvalidWmpVersionException

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

v  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.

v  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.

v  System.Workflow.Runtime.Hosting.PersistenceException

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

v  System.Workflow.Runtime.TrackingTrackingProfileDeserializationException

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

v  System.Xml.Schema.XmlSchemaException

Ø  Returns detailed information about the schema exception.

v  System.Xml.XmlException

Ø  Returns detailed information about the last exception.

v  System.Xml.XPath.XPathException

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

v  System.Xml.Xsl.XsltException

 

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


Don't want to miss updates? Please click the below button!

Follow MindStick