public static int LogError(Exception ex, string internalUsername) { BO.ORCID.ErrorLog bo = new BO.ORCID.ErrorLog(); bo.Exception = GetExceptionDetails(ex); if (!string.IsNullOrEmpty(internalUsername)) { bo.InternalUsername = internalUsername; } bo.OccurredOn = DateTime.Now; bo.Processed = false; try { new BLL.ORCID.ErrorLog().Add(bo); return(bo.ErrorLogID); } catch // (Exception ex2) { // just move along as the logging of errors is failing. return(0); } }
public static int LogError(Exception ex, string internalUsername) { BO.ORCID.ErrorLog bo = new BO.ORCID.ErrorLog(); bo.Exception = GetExceptionDetails(ex); if (!string.IsNullOrEmpty(internalUsername)) { bo.InternalUsername = internalUsername; } bo.OccurredOn = DateTime.Now; bo.Processed = false; try { new BLL.ORCID.ErrorLog().Add(bo); return bo.ErrorLogID; } catch // (Exception ex2) { // just move along as the logging of errors is failing. return 0; } }