EDMIAPI/DatabaseWithFallback: Handle exception in GetDatatable
This commit is contained in:
parent
f5499e23e3
commit
69c81cf2fc
@ -23,10 +23,18 @@ Public Class DatabaseWithFallback
|
||||
Dim oResult As DataTable = Nothing
|
||||
|
||||
If ForceFallback = False Then
|
||||
Dim oTableResult As TableResult = _Client.GetDatatableByName(DataTable, FilterExpression, SortByColumn)
|
||||
Dim oTableResult As TableResult
|
||||
|
||||
Try
|
||||
oTableResult = _Client.GetDatatableByName(DataTable, FilterExpression, SortByColumn)
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
oTableResult = Nothing
|
||||
End Try
|
||||
|
||||
If oTableResult Is Nothing OrElse oTableResult.OK = False Then
|
||||
_Logger.Warn("Datatable [{0}] could not be fetched from AppServer Cache. Falling back to direct Database Access.")
|
||||
Return GetDatatableFromDatabase(FallbackSQL, FallbackType)
|
||||
End If
|
||||
|
||||
Return oTableResult.Table
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user