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); }
public override string ToString() { return(ExceptionUtility.FormatException(Error, true, true)); }