The unhandled error codes in aspx.cs will be caught by Application_Error handler in global.asax.
I have write some codes in Application_Error handler to log such unhandled errors happened in aspx.cs
But if the codes of log itself also fails and generated a exception.(maybe due to I/O or files system problems)
Should I throw such exception out ?
If I throw it out, which event should receive such exception ?
Or it makes no difference if I write "throw" syntax or not ?
The code samples as following
protected void Application_Error(object sender, EventArgs e)
{
try
{
// my codes to log exception to Database System here....
}
catch(Exception)
{
throw; //Should I write "throw" syntax here ?
}
}