Exemplo n.º 1
0
        private AuditEvent CreateEventForException(Type component, Exception exception, int eventId = 0, Guid?messageId = null)
        {
            var auditEvent = new ExceptionAuditEvent
            {
                Error     = exception,
                EventId   = eventId,
                MessageId = messageId
            };

            CommonAuditEventPopulation(component, auditEvent);

            auditEvent.Message          = exception.Message;
            auditEvent.FormattedMessage = ExceptionUtility.FormatException(exception, true, true, true);

            return(auditEvent);
        }
Exemplo n.º 2
0
 public override string ToString()
 {
     return(ExceptionUtility.FormatException(Error, true, true));
 }