public void LogException(string message, string callstack) { ExceptionDataObject exceptionObject = new ExceptionDataObject { Message = message, CallStack = callstack, ExceptionType = "JavaScript", UserAgent = Request.UserAgent, UserId = (int?)Session[SessionKeys.USER_ID] }; ProcessFactory.GetExceptionProcess().Insert(exceptionObject); }
private void LogException(string message, string type, Exception exception) { UserPrincipal user = GetUserPrincipal(); ExceptionDataObject exceptionObject = new ExceptionDataObject { Message = message, CallStack = exception.StackTrace, ExceptionType = type, UserAgent = Request.UserAgent, UserId = user != null ? (int?)user.Id : null }; ProcessFactory.GetExceptionProcess().Insert(exceptionObject); }
public void Insert(ExceptionDataObject exceptionObject) { using (var context = new IdeaPoolEntities()) { Exception exception = new Exception { Message = exceptionObject.Message, CallStack = exceptionObject.CallStack, CreatedDate = DateTime.UtcNow, ExceptionType = exceptionObject.ExceptionType, UserId = exceptionObject.UserId, UserAgent = exceptionObject.UserAgent }; context.Exceptions.Add(exception); context.SaveChanges(); } }
private void SendEmail <T>(EmailSettings settings, string templateName, T model) { try { emailNotification.SendSystemEmail(settings, templateName, model); } catch (System.Exception ex) { ExceptionDataObject exceptionObject = new ExceptionDataObject { Message = ex.Message, CallStack = ex.StackTrace, ExceptionType = "Email", UserId = LoginUserId }; ProcessFactory.GetExceptionProcess().Insert(exceptionObject); } }
public void Insert(ExceptionDataObject exceptionObject) { exceptionData.Insert(exceptionObject); }