public virtual void Error(System.Exception ex, string additionalMessage) { string userIdentity = System.Threading.Thread.CurrentPrincipal.Identity.Name; string message = LoggingGateway.getFormattedMessageFromException(ex, userIdentity, additionalMessage); this.Error(LoggingGateway.getParsedExceptionType(ex.GetType()), message, userIdentity); }
public virtual void Error(System.Exception ex, System.Data.Common.DbCommand command) { try { string userIdentity = System.Threading.Thread.CurrentPrincipal.Identity.Name; string message = LoggingGateway.getFormattedMessageFromException(ex, userIdentity, string.Empty); message += command.GetLogMessage(); message = message + "Call stack: " + System.Environment.StackTrace; this.Error(LoggingGateway.getParsedExceptionType(ex.GetType()), message, userIdentity); } catch (System.Exception ex2) { this.Trace(ex2); } }