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

@@ -217,14 +217,24 @@ namespace AyaNova.DataList
catch (Npgsql.PostgresException e)
{
//log out the exception and the query
log.LogInformation("DataList query failed unexpectedly. Data Query was:");
log.LogInformation(qDataQuery);
log.LogInformation("Count Query was:");
log.LogInformation(qTotalRecordsQuery);
log.LogInformation(e, "DB Exception");
throw new System.Exception("DataListFetcher - Query failed see log");
log.LogError("DataListFetcher:GetResponseAsync query failed. Data Query was:");
log.LogError(qDataQuery);
log.LogError("Count Query was:");
log.LogError(qTotalRecordsQuery);
log.LogError(e, "DB Exception");
throw new System.Exception("DataListFetcher:GetResponseAsync - 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("DataListFetcher:GetResponseAsync unexpected failure. Data Query was:");
log.LogError(qDataQuery);
log.LogError(e, "Exception");
throw new System.Exception("DataListFetcher:GetResponseAsync - unexpected failure see log");
}
}
@@ -336,12 +346,22 @@ namespace AyaNova.DataList
catch (Npgsql.PostgresException e)
{
//log out the exception and the query
log.LogInformation("DataListFetcher:GetIdListResponseAsync query failed unexpectedly. Data Query was:");
log.LogInformation(qDataQuery);
log.LogError("DataListFetcher:GetIdListResponseAsync query failed unexpectedly. IDList Query was:");
log.LogError(qDataQuery);
log.LogInformation(e, "DB Exception");
log.LogError(e, "DB Exception");
throw new System.Exception("DataListFetcher:GetIdListResponseAsync - 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("DataListFetcher:GetIdListResponseAsync unexpected failure. IDList Query was:");
log.LogError(qDataQuery);
log.LogError(e, "Exception");
throw new System.Exception("DataListFetcher:GetIdListResponseAsync - unexpected failure see log");
}
}
return retList.ToArray();
}