Exemple #1
0
        public void OnException(ExceptionContext context)
        {
            //提交异常信息
            ExceptionlessUtil.TraceException(context.Exception);

            //转到错误页面
            context.Result = new RedirectResult("/error");
            context.HttpContext.Response.StatusCode = (int)HttpStatusCode.InternalServerError;

            //标记已处理
            context.ExceptionHandled = true;
        }