.Net捕捉配置或程序错误

1 protected void Application_Error(object sender, EventArgs e)
2         {
3             Exception objError = Server.GetLastError();
4             string s = string.Empty;
5             if (objError.InnerException != null)
6                 s = objError.InnerException.ToString();
7             _logger.Error(LogSourceName, "System Error. " + objError.Message + s, objError);
8         }

 

posted on 2018-01-26 11:31  Riusmary  阅读(145)  评论(0编辑  收藏  举报

导航