SetException() public method

public SetException ( Exception ex ) : void
ex System.Exception
return void
Esempio n. 1
0
        internal static LogEventInfoItem GetForInsert(LogWriteContext context, LogEventInfo info, SessionHeaderItem session)
        {
            var item = new LogEventInfoItem()
            {
                SessionId = session.SessionId,
                DateTimeUtc = info.TimeStamp.UtcDateTime,
                SequenceId = info.SequenceID,
                Level = info.Level,
                Logger = info.Logger,
                Message = info.Message
            };

            // if...
            if (info.Exception != null)
                item.SetException(info.Exception);

            // return...
            return item;
        }
Esempio n. 2
0
        internal static LogEventInfoItem GetForInsert(LogWriteContext context, LogEventInfo info, SessionHeaderItem session)
        {
            var item = new LogEventInfoItem()
            {
                SessionId   = session.SessionId,
                DateTimeUtc = info.TimeStamp.UtcDateTime,
                SequenceId  = info.SequenceID,
                Level       = info.Level,
                Logger      = info.Logger,
                Message     = info.Message
            };

            // if...
            if (info.Exception != null)
            {
                item.SetException(info.Exception);
            }

            // return...
            return(item);
        }