are system exceptions different from application exceptions in .NET?
of your program, if there is any unexpected behavior then exception will
be thrown and the program will be terminated. .NET provides good exception
handling using the exception classes.
For any exception, System.Exception is the base class. This System.Exception
is classified into system exceptions and application exceptions. System
exceptions are predefined exceptions provided by .NET. All framework exceptions
form part of system exceptions. Application exceptions are application
specific, encouraging user to define their own user defined exceptions.
hierarchy of .NET is illustrated using the diagram shown below:
The purpose of system exception, application exception and how they are
different from one another are tabulated below:
throws system exception
throws application exception
exceptions are generic in nature
exceptions are not generic. Each application exception has its own
system exception has a meaning. You can directly use them or you can
derive new ones by inheriting System.Exception
exceptions do not have a meaning for themselves. You have to explicitly
derive from them and create your own custom exceptions specific to
for system exceptions include SqlException, StackOverflowException
for application exceptions include SharePointException, CmsException