Handle Exception Only in Release Mode?

  • Thread starter Thread starter Al Cohen
  • Start date Start date
A

Al Cohen

When I'm running in Debug mode, I like the pages that ASP.NET displays
when I hit an unhandled exception. However, for Release mode, I'd like
to handle the exception with a nice page that apologizes to the user and
doesn't display the stack trace, by putting something in global.asax's
Application_Error.

Is there any way to have this functionality be different in Debug vs.
Release mode? One thing that comes to mind is to test for debug mode in
Application_Error, but I can't figure out how to do this.

Thanks,

Al Cohen
 
Back
Top