AppfailReporting.AppfailModule.ApplicationOnError C# (CSharp) Méthode

ApplicationOnError() private méthode

private ApplicationOnError ( object sender, EventArgs eventArgs ) : void
sender object
eventArgs System.EventArgs
Résultat void
        private void ApplicationOnError(object sender, EventArgs eventArgs)
        {
            // Invoked when the asp.net application encounters an error
            // Need to be cautious not to cause unhandled exceptions in this code.
            var current = HttpContext.Current;
            if (current != null && current.Server != null)
            {
                var exception = HttpContext.Current.Server.GetLastError();

                exception.SendToAppfail();
            }
        }