using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using QMFrameWork.Log; namespace QMAPP.Common.Controllers { /// /// 异常处理 /// public class ErrorController : Controller { // // GET: /Error/ public ActionResult ShowException(Exception error) { //记录异常日志 if (LogManager.LogHelper != null) { LogManager.LogHelper.Error(new LogInfo { Info = "application", ErrorInfo = error }); } if (error != null) { error = new Exception("系统异常"); } HandleErrorInfo model = new HandleErrorInfo(error, "Application", "action"); ViewResult vr = null; vr = new ViewResult { ViewName = "Error", MasterName = "Site", ViewData = new ViewDataDictionary(model) }; return vr; } } }