Is there anything wrong with catching errors in an ASP.NET application globally (eg: Global.asax)? I have viewed the question Good error handling practice and it doesn't really say too much about this.
My experience has been excluding some very specific circumstances (such as transactions) most of the ASP.NET applications we are writing are along the lines of
void ButtonEventHandler(object sender, EventArgs e) {
Page.Validate();
if (Page.IsValid) {
//Do a database insert or update thru relevant datalayers.
//If its a transaction then we rollback internally and rethrow
//the exception.
}
}
Why not just have a global exception handler? Usually (at this point) the only thing I can do is abort the operation gracefully and tell the user to try again.