CAESDO.Recruitment.Web.ApplicationPage.OnError C# (CSharp) Метод

OnError() защищенный Метод

protected OnError ( EventArgs e ) : void
e System.EventArgs
Результат void
        protected override void OnError(EventArgs e)
        {
            //Might want to rollback the transaction whenever an error gets this far up the stack
            NHibernateSessionManager.Instance.RollbackTransaction();

            //Grab the page context
            HttpContext ctx = HttpContext.Current;

            //Grab the exception that raised this error
            Exception ex = ctx.Server.GetLastError();

            //Only handle HttpException Errors
            if (ex.GetType().Name == "HttpException")
            {
                //Clear the error and redirect to the page the raised this error (getting a fresh copy)
                ctx.Server.ClearError();
                ctx.Response.Redirect(RecruitmentConfiguration.ErrorPage(RecruitmentConfiguration.ErrorType.SESSION));
            }

            base.OnError(e);
        }
ApplicationPage