void LogException(object source, Exception ex)
        {
            try
            {
                Elmah.RaiseErrorSignal(ex);

                // Rely on ELMAH configuration to filter messages from Log4Net
                if (IsFiltered(ex)) return;

                source = Type.GetType(ex.GetBaseException().Source, false) ?? Type.GetType(ex.Source, false) ?? source;
                Logger.Error(source, ex.Serialize());
            }
            catch
            {
            #if DEBUG
                Debugger.Break();
            #endif
            }
        }
Esempio n. 2
0
 bool log(IAction action, bool completed, bool reversed, Exception ex)
 {
     var info = new ActionInfo
     {
         ID = ID,
         BID = BID,
         Order = action.Order,
         Data = action.GetData().Serialize(),
         Result = action.GetResult().Serialize(),
         Action = action.GetType().Name,
         Exception = ex.Serialize(),
         Completed = (ex== null) && completed,
         Reversed = (ex == null) && reversed,
         VersionTime = DateTime.Now,
         IsLast = true
     };
     lock (lockObj)
     {
         actionStore[ID].Actions.Add(info);
     }
     return true;
 }
 private void ForwardToPoisonMessageQueue(Message message, Exception exception)
 {
     message.Extension = exception.Serialize();
     this.poisonQueue.Send(message);
 }