Amss.Boilerplate.Web.MvcApplication.Application_Error C# (CSharp) Method

Application_Error() protected method

protected Application_Error ( ) : void
return void
        protected void Application_Error()
        {
            var error = Server.GetLastError();
            try
            {
                Log.ErrorFormat(
                    CultureInfo.InvariantCulture,
                    "Server error has been occured while processing page: {0} ",
                    error,
                    HttpContext.Current != null ? HttpContext.Current.Request.Url.ToString() : "unknown");
            }
            catch (Exception ex)
            {
                Trace.TraceError(ex.Message);
            }

            this.HandleCustomErrors(error);
        }