protected void Application_Error() { var error = Server.GetLastError(); if (error != null) { var ev = new ApplicationErrorEvent("Error caught in global.asax Application_Error", this, error); ev.Raise(); } }
private void OnAppErrorEvent(ApplicationErrorEvent eventItem) { List <Type> eventTypeList; if (!_userGuidToEventDictionary.TryGetValue(eventItem.Guid, out eventTypeList) || !eventTypeList.Contains(eventItem.GetType())) { return; } var guid = eventItem.Guid; var connectionId = SearchHub.GuidDictionary[guid]; if (!SearchHub.GuidDictionary.ContainsKey(guid)) { return; } GlobalHost.ConnectionManager.GetHubContext <SearchHub>().Clients.Client(connectionId).appError(eventItem.ErrorMessage); }
/// <summary> /// ����ϵͳ�쳣 /// </summary> /// <param name="event">The @event.</param> public void LoggingError(ApplicationErrorEvent @event) { Logger.Log(@event.Exception.Message, Category.Exception, Priority.High); }