Name:-Vrushabh Shashikant Rasal Class:Tybsc-It ROLL NO:556 Div: A Subject:-Advanced Web Programming
Name:-Vrushabh Shashikant Rasal Class:Tybsc-It ROLL NO:556 Div: A Subject:-Advanced Web Programming
T
CLASS:TYBSC-IT P.
N
E
S
ROLL NO:556 IN
A
DIV: A
G
I N
L
D
SUBJECT:-ADVANCED
H
A
N
WEB PROGRAMMING
N
IO
T
P
E
C
X
E
:
IC
P
O
T
EXCEPTION HANDLING IN ASP.NET
INTRODUCTION
Exception handling is an in-built mechanism in .NET Framework to detect and
handle run time errors. Exceptions are defined as anomalies that occur
during the execution of a program. The .NET Framework provides a rich
set of standard exceptions that are used during exceptions handling.
Exception handling is one of the major features provided by .NET. There
might be various reasons to handle exception, this can be caused due to
improper user inputs, improper design logic or system errors. In this
scenario, if applications do not provide a mechanism to handle these
anomalies, then there might be cases in which the application may crash.
.NET run time environment provides a default mechanism, which
terminates the program execution.
WHAT IS EXCEPTION HANDLING?
Exception handling refers to the way that a program handles exceptional
circumstances. ... Fortunately, most programming languages have a code
construct that will allow an exception to be handled smoothly. It requires
you to write an exception handler that will be called and run when an
exception is encountered.
ASP.NET EXCEPTION HANDLING
unhandled error
UNHANDLED EXCEPTIONS
An unhandled exception is propagated to the caller of the function in which
it is raised.
This propagation continues to the main function.
If no handler is found, The default handler is called.
SPECIAL CASE
This option provides a special case for the custom error page depending upon the
HTTP status code. For example, a custom error page if the request attempts to
access a page does not exist (HTTP 404). Following configuration element need to
be put that can be nested in <customErrors>, <error> as:
THANK YOU!