This commit is contained in:
2021-01-22 17:54:34 +00:00
parent d8c4455e84
commit 69cead72f1
3 changed files with 46 additions and 16 deletions

View File

@@ -72,11 +72,20 @@ namespace AyaNova.PickList
//This may be called internally in *Biz classes who don't have a log of their own
if (log == null)
log = AyaNova.Util.ApplicationLogging.CreateLogger("PickListFetcher");
log.LogInformation("PickList query failed unexpectedly. Query was:");
log.LogInformation(q);
log.LogInformation(e, "DB Exception");
log.LogError("PickList query failed unexpectedly. Query was:");
log.LogError(q);
log.LogError(e, "DB Exception");
throw new System.Exception("PickListFetcher - Query failed see log");
}
catch (System.Exception e)
{
//ensure any other type of exception gets surfaced properly
//log out the exception and the query
log.LogError("PickListFetcher unexpected failure. Query was:");
log.LogError(q);
log.LogError(e, "Exception");
throw new System.Exception("PickListFetcher - unexpected failure see log");
}
}
return ret;