Application-level error handling : Exception « Development « ASP.NET Tutorial






Protected Sub Application_Error(sender as Object, ByVal e As System.EventArgs)
    Dim bigError As System.Exception = Server.GetLastError()
    If (TypeOf AnError.GetBaseException() Is HttpRequestValidationException) Then
        System.Diagnostics.Trace.WriteLine(bigError.ToString)
        Server.ClearError()
    End If
End Sub








9.18.Exception
9.18.1.What is going to happen if there is no exception handler
9.18.2.Divide By Zero With Exception
9.18.3.Catch exception and display exception message, Source and StackTrace (C#)
9.18.4.Page-level error handling
9.18.5.Application-level error handling
9.18.6.Try to catch error when converting text value to number
9.18.7.Use Global.asax to log application level exception
9.18.8.Generic error handler page
9.18.9.Transfer to different page based on exception type