Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Just curious how some of you other guys handle unhandled errors in your ASP.NET applications...

 

1. Just throw the error and show a custom error page? Or worse the default error page?

 

2. Do a stack trace and put it in a log, or db, or email it? (What I do; however in release mode doesn't do a lot of good since I have no line numbers) and then do #1 or something else?

 

3. Catch all errors and just do nothing and leave the user thinking something was accomplished that wasn't? I hope not.

 

4. Redirect to a start page? Not very user friendly.

 

Reason I ask is I'm not really happy with my methods and wanted to do some personal research from the folks that visit here on what they do. Then while I wait on answer here I'll be Googling to see what suggestions I can find out there on the web?

Posted

I know this probably isn't very professional, but I generally include a hidden Label control that I will write error messages to and display whenever my form experiences errors. Generally, I include error prone routines in a try-catch block, and use the Exception Message as the Label's text with the note to kindly inform the webmaster (me).

 

Hopefully, that doesn't happen too often, though.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...