Browse Source

首页报错添加日志

master
lvzb 1 year ago
parent
commit
0829aca648
  1. 4
      SCP/Global.asax.cs

4
SCP/Global.asax.cs

@ -73,10 +73,10 @@ namespace SCP
{
String errorCode = Guid.NewGuid().ToString();
String errorMsg = objExp.InnerException == null ? objExp.GetBaseException().Message : objExp.InnerException.Message+ objExp.InnerException.StackTrace;
String errorMsg = objExp.InnerException == null ? objExp.GetBaseException().Message : objExp.InnerException.Message+ objExp.InnerException.StackTrace;
HttpContext.Current.Server.ClearError();
LogHelper.Writlog(LogHelper.LogType.Error, typeof(Global), "Application_Error", objExp.Message+ "InnerMess:" + objExp.InnerException.Message + "InnerST:" + objExp.InnerException.StackTrace);
ShowError(errorCode, errorMsg, HttpContext.Current);
}
}

Loading…
Cancel
Save