I have a web application which retrieves a PDF for a user based on a list they can choose from. Sometimes its possible that a PDF has been listed that isn't physically available to the user (its not on the hard drive of the server) and when this happens I display a message to the user (This is an error blah blah).
I have also got the Application_Error method set up in Global.asax.cs which sends an e-mail each time my web app falls over.
Now because I am gracefully catching the error of the file not being available (displaying an error message) I would also like to throw a new exception in order to automatically invoke the Application_Error method to send me an e-mail detailing an error occured.
But throwing a new exception of course causes the application to crash. So how can I "silently" throw an exception the background so the user is non the wiser yet Application_Error is still invoked? ...
Go to the complete details ...