edmiapi: Improve error logging

This commit is contained in:
Jonathan Jenne 2023-06-16 09:19:24 +02:00
parent 36b38f0bd8
commit 8c1a1af140

View File

@ -203,15 +203,18 @@ Public Class DatabaseWithFallback
' If the table is not cached, we try going through the service
If Not IsTableCached(pDataTableName) Then
_Logger.Debug("Datatable is not chached, fetching data from service.")
Return GetDatatableFromService(pFallbackSQL, pFallbackType, pConnectionId)
End If
' If there is a proper ConnectionId, we try going through the service
If pConnectionId > 0 Then
_Logger.Debug("ConnectionId is set, fetching data from service.")
Return GetDatatableFromService(pFallbackSQL, pFallbackType, pConnectionId)
End If
Try
_Logger.Debug("Datatable is chached, fetching data from cache.")
oTableResult = _Client.GetDatatableByName(pDataTableName, pFilterExpression, pSortByColumn)
Catch ex As Exception
_Logger.Error(ex)