Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Error handling in ASP.NET
1.
2. Disclaimer: This presentation is prepared by trainees of
baabtra as a part of mentoring program. This is not official
document of baabtra –Mentoring Partner
Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt .
Ltd
5. Error Handling in Asp .net
MuhammedAjaml
mhdajmalik@gmail.com
www.facebook.com/ajuik
twitter.com/username
in.linkedin.com/in/profilename
9745020951
6. Exception
• Exceptions are unforeseen errors that happen within
the logic of an application.
– File not found
– Unautherised access
– Argument NullException
– Arithmetic Exception
8. Unhandled exception
• An unhandled exception is displayed to the user using
an”yellow screen of death”
9. Disadvantage of yellow screen of
death
. The error messages are cryptic and may not make any
sense to the end user
. The exception information may be useful for a hacker,
to hack into your application
10. Exception handling using - try-
catch
Try
{
Wrap the code in a try block that could possibly cause an
exception
}
Catch(Exception e)
{//handle errors}
Finally
{//Used to free resources.}
11. Example
• A program to read data from XML file and display it
to the Grid View
21. Asp .net Error Events
• Page_Error
– Used in page level
– This event raised whenever an unhandled exception occurs
in the page.
• Application_Error
– Used in application level
– This event raised whenever an unhandled exception occurs
in the application.
29. If this presentation helped you, please visit our
page facebook.com/baabtra and like it.
Thanks in advance.
www.baabtra.com | www.massbaab.com |www.baabte.com
30. Contact Us
Emarald Mall (Big Bazar Building)
Mavoor Road, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550
NC Complex, Near Bus Stand
Mukkam, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550
Start up Village
Eranakulam,
Kerala, India.
Email: info@baabtra.com
IKK Road,
East Hill, Kozhikode
Kerala, India.
Ph: + 91 – 495 30 63 624
NIT-TBI,
NIT Campus, Kozhikode,
Kerala, India.