Author: Yaniv.net | Posted on: 7/31/2009 5:38:30 AM | Views : 521

i would like to handle exception properly in my webapplication.
for the exception that i didnt catch i am using theApplication_Error event in the global.asax that calles my static method and then redirect to an errorpage:

void Application_Error(object sender, EventArgs e) { General.HandleCustomException("My Custom Message"); Response.Redirect("Msg.aspx?msg=Error occurred , please try again Later", true); }
and in every try/catch block in my application i called the same static method, update the label in the page with the error details or redirect to anyother page :
try {
some code ...
}
catch{
General.HandleCustomException("My Custom Message");       
}
finally{
lblErr.txt = "Error Message";
}
is it the right way to handle exceptio ...

Go to the complete details ...