Example #1
0
        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();
            }
        }
Example #2
0
        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);
        }
Example #3
0
 /// <summary>
 /// ����ϵͳ�쳣
 /// </summary>
 /// <param name="event">The @event.</param>
 public void LoggingError(ApplicationErrorEvent @event)
 {
     Logger.Log(@event.Exception.Message, Category.Exception, Priority.High);
 }