Tutorials
Resources
Forum
Communities
Interview
Jobs
Projects
Offshore Development
Silverlight Tutorials
|
Mentor
|
Code Converter
|
Articles
|
Code Factory
|
Computer Jokes
|
Members
|
Peer Appraisal
|
IT Companies
|
Bookmarks
|
Revenue Sharing
|
Prizes & Awards
My Profile
Sign In
Register
AdSense Revenue
Active Members
Today
sabeer masthan
(259)
amarababu nara...
(204)
Deepika Harida...
(79)
Last 7 Days
Deepika Harida...
(1268)
Pradeep Y
(1157)
amarababu nara...
(1031)
more...
New Feature:
Community Sites
:
Create your own .NET community website and start earning from Google AdSense !
It's Free !
Exceptions in the .net framework
Posted Date: 04 Nov 2004 Resource Type:
Articles
Category:
.NET Framework
Posted By:
shweta srinivasan
Member Level:
Silver
Rating:
Points
: 5
Introduction
This article explains the exception classes available in the .net framework. The details are collected from the MSN Microsoft website and are formatted for the convenience of the readers.
System.Arithmetic Exception: The exception that is thrown for errors in ana arithmetic, casting or conversion operation. It includes:
1. System.DivideByZeroException: It is thrown when there is an attempt to divide an integral or decimal value by zero.
2. System.NotFiniteNumberException: thrown when a floating-point value is positive infinity, negative infinity or Not-a-Number.
3. System.OverFlowException: thrown when an arithmetic, casting or conversion operation in a context results in an overflow.
System.ApplicationException: Exception that is thrown when a non-fatal application error occurs
1.System.Reflection.InvalidFilterCriteriaException: thrown when the filter criteria is not valid for the type of filter we are using
2. System.Reflection.TargetException: thrown when an attempt is made to invoke an invalid target
3. System.Reflection.TargetInvocationException: thrown by the methods invoked through reflection. This class cannot be inherited
4. System.Reflection.TargetParameterCountException: thrown when the number of parameters for an invocation does not match the number expected. This class cannot be inherited
System.ArgumentException: Exception is thrown when one of the arguments provided to a method is not valid
1. System.ArgumentNullException: Thrown when a null reference is passed to a method that does not accept it as a valid argument
2. System.ArgumentOutOfRange: thrown when the value of an argument is outside the allowable range of values as defined by the invoked method
3. System.ComponentModel.InvalidEnumArgument:thworn when using invalid arguments that are enumerators
4. System.DuplicateWaitObjectException:thrown when an object appears more than once in an array of synchronization objects
System.ArrayTypeMismatchException: Exception is thrown when an attempt is made to store an element of the wrong type within an array.
System.BadImageFormatException: Exception is thrown when the file image of a DLL or an executable program is invalid
System.CannotUnloadAppDomainException: Exception is thrown when an attempt to unload an application domain fails
System.ContextMarshallException: Exception is thrown when an attempt to marshall an object across a context boundary fails
System.TypeLoadException: Exception is thrown when type loading failure occurs.
1. System.DllNotFoundException: thrown when a DLL specified in a DLL import cannot be found
2. System.EntryPointNotFoundException: thrown when an attempt to load a class fails due to the absence of an entry method
System.ExecutionEngineException: Exception is thrown when there is an internal error in the execution engine of the CLR. This class cannot be inherited.
System.MemberAccessException: Exception is thrown when an attempt to access a class member fails
1. System.FieldAccess: thrown when there is an invalid attempt to access a private or protected field inside a class
2. System.MethodAccess: thrown when there is an invalid attempt to access a private or protected method inside a class
3. System.MissingMember: thrown when there is an attempt to dynamically access a class member that doe not exist:
1. System.MissingFieldException: thrown when there is an attempt to dynamically access a field that does not exist
2. System.MissingMethodException: thrown when there is an attempt to dynamically access a method that does not exist
System.FormatException: Exception is thrown when the format of an argument does not meet the parameter specification of the invoked method.
1. System.Net.CookieException: thrown when an error is made adding a cookie to a cookie container
2. System.Reflection.CustomAttributeFormat: thrown when the binary format of a custom attribute is invalid
3. System.UriFormateException: thrown when an invalid Uniform Resource Identifier (URI) is detected
System.IndexOutOfRangeException: Exception 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.InvalidCastException: Exception is thrown for invalid casting or explicit conversion
System.InvalidOperationException: Exception is thrown when a method call is invalid for the objects current state.
1. System.Net.ProtocolCiolation: thrown when an error is made while using a network protocol
2. System.Net.WebException: thrown when an error occurs while accessing the network through a pluggable protocol
3. System.ObjectDisposed: thrown when an operation is performed on a disposed object
System.InvalidProgramException: Exception is thrown when a program contains invalid MSIL or metadata. Generally this indicates a bug in the compiler that generated the program
System.MultiCastNotSupportedException: Exception is thrown when there is an attempt to combine two instances of a non-combinable delegate type unless one of the operands is a null reference. This class cannot be inherited.
System.NotImplementedException: Exception is thrown when a requested method or operation is not implemented
System.NotSupportedException: Exception 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.
1. System.PlatformNotSupported: Exception is thrown when a feature does not run on a particular platform
System.NullReferenceException: Exception is thrown when there is an attempt to dereference a null object reference
System.OutOfMemoryException: Exception is thrown when there is not enough memory to continue the execution of a program
System.RankException: Exception is thrown when an array with the wrong number of dimensions is passed to a method
System.StackOverflowException: Exception is thrown when the execution stack overflows by having too many pending method calls. This class cannot be inherited
System.TypeInitializationException: Exception is thrown as a wrapper around the exception thrown by the class initializer. This class cannot be inherited
System.TypeUnloadedException: Exception is thrown when there is an attempt to access an unloaded class
System.UnauthrorizedAccessException: Exception is thrown when the operating system denies access because of an I/O error or a specific type of security error
System.IO.IOException: Exception is thrown when an I/O error occurs
1. System.IO.DirectoryNotFound: thrown when part of a file or directory cannot be found
2. System.IO.EndOFStream:thrown when reading is attempted past the end of a stream
3. System.IO.FileLoad: thrown when a managed assembly is found but cannot be loaded
4. System.IO.FileNotFound: thrown when an attempt to access a file that does not exist on disk fails
5. System.IO.PathTooLong: thrown when a pathname or filename is longer than the System-defined maximum length
Responses
No responses found. Be the first to respond and make money from
revenue sharing program
.
Feedbacks
Popular Tags
What are tags ?
Search Tags
Sign In
(No tags found.)
Post Feedback
This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must
Sign In
to post a response.
Next Resource:
Retrieving HTML content from a given URL by making a web request
Previous Resource:
Common function which can be used to fetch values from the database
Return to Discussion Resource Index
Post New Resource
Category:
.NET Framework
Post resources and
earn money
!
Related Resources
Read data asynchronously as XML using SqlCommand Object
Unleash the power of .NET with encryption
How to convert a simple DLINQ Query to a data set object
Create a CSV File using System.IO classes
Differences between DataSet and DataReader
dotNet Slackers
BizTalk Adaptors
Web Design
doors in nj
Contact Us
Privacy Policy
Terms Of Use