private void determineError(StockCoreException e) { if (e != null && !e.IsLogged) { logger.TraceError(e); e.IsLogged = true; } }
private StockCoreLightweightException getException(string methodName, Exception ex) { StockCoreLightweightException exception = null; if (ex != null) { StockCoreException e = null; if (ex is StockCoreException) { e = (StockCoreException)ex; exception = new StockCoreLightweightException().Load(e); } else { e = new StockCoreException(processID, methodName, ex, info: "Capture at Web API level"); exception = new StockCoreLightweightException().Load(e); } determineError(e); } return(exception); }
public static StockCoreLightweightException Load(this StockCoreLightweightException item, StockCoreException ex) { if (ex != null) { item.ID = ex.ID; item.ModuleName = ex.ModuleName; item.Info = ex.Info; item.ErrorID = ex.ErrorID; } return(item); }