天津投入产出系统后端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

47 lines
1.1 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using QMFrameWork.Log;
namespace QMAPP.Common.Controllers
{
/// <summary>
/// 异常处理
/// </summary>
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<HandleErrorInfo>(model)
};
return vr;
}
}
}