コード例 #1
0
        public ActionResult ServerError(string id)
        {
            ExodusException ex = Global.Cache.ExceptionGet(id) as ExodusException ?? new ExodusException();

            //
            return(View(ex));
        }
コード例 #2
0
        protected override void HandleUnknownAction(string actionName)
        {
            string          controllerName = this.ControllerContext.RouteData.Values["controller"].ToString();
            ExodusException ex             = new ExodusException($"Action [{actionName}] Not Found in controller [{controllerName}]");

            Log4Net.Logger.Write_Error(ex);
            //
            Guid guid = Guid.NewGuid();

            Global.Cache.ExceptionSet(guid.ToString(), ex);
            this.Request.RequestContext.HttpContext.Response.RedirectToRoute("ServerError", new { id = guid.ToString() });
            //
            base.Initialize(this.Request.RequestContext);
        }