ClipboardWatcher: use profile errormessage
This commit is contained in:
parent
07171c6973
commit
f41710d356
@ -19,7 +19,7 @@ Public Class ProfileFilter
|
||||
Private _LogConfig As LogConfig
|
||||
Private _Logger As Logger
|
||||
|
||||
Enum ImageIndex
|
||||
Public Enum ImageIndex
|
||||
Root
|
||||
Profile
|
||||
Clipboard
|
||||
@ -28,6 +28,11 @@ Public Class ProfileFilter
|
||||
Control
|
||||
End Enum
|
||||
|
||||
Public Const ERROR_LOADING_COUNT_SQL_FOR_DATA_SEARCH = "ERROR_LOADING_COUNT_SQL_FOR_DATA_SEARCH"
|
||||
Public Const ERROR_LOADING_COUNT_SQL_FOR_DOC_SEARCH = "ERROR_LOADING_COUNT_SQL_FOR_DOC_SEARCH"
|
||||
Public Const ERROR_EXECUTING_COUNT_SQL_FOR_DATA_SEARCH = "ERROR_EXECUTING_COUNT_SQL_FOR_DATA_SEARCH"
|
||||
Public Const ERROR_EXECUTING_COUNT_SQL_FOR_DOC_SEARCH = "ERROR_EXECUTING_COUNT_SQL_FOR_DOC_SEARCH"
|
||||
|
||||
Public ReadOnly Property Profiles As List(Of ProfileData)
|
||||
Get
|
||||
Return _Profiles
|
||||
@ -348,6 +353,7 @@ Public Class ProfileFilter
|
||||
Try
|
||||
oDTDataSearches = Database.GetDatatable($"SELECT COUNT_COMMAND, CONN_ID FROM TBCW_PROF_DATA_SEARCH WHERE ACTIVE = 1 AND PROFILE_ID = {oProfile.Guid}")
|
||||
Catch ex As Exception
|
||||
oProfile.ErrorMessage = ERROR_LOADING_COUNT_SQL_FOR_DATA_SEARCH
|
||||
_Logger.Error(ex)
|
||||
Continue For
|
||||
End Try
|
||||
@ -355,6 +361,7 @@ Public Class ProfileFilter
|
||||
Try
|
||||
oDTDocSearches = Database.GetDatatable($"SELECT COUNT_COMMAND, CONN_ID FROM TBCW_PROF_DOC_SEARCH WHERE ACTIVE = 1 AND PROFILE_ID = {oProfile.Guid}")
|
||||
Catch ex As Exception
|
||||
oProfile.ErrorMessage = ERROR_LOADING_COUNT_SQL_FOR_DOC_SEARCH
|
||||
_Logger.Error(ex)
|
||||
Continue For
|
||||
End Try
|
||||
@ -383,6 +390,7 @@ Public Class ProfileFilter
|
||||
|
||||
_Logger.Debug("Datarows returned from search: [{0}]", oResultData)
|
||||
Catch ex As Exception
|
||||
oProfile.ErrorMessage = ERROR_EXECUTING_COUNT_SQL_FOR_DATA_SEARCH
|
||||
_Logger.Error(ex)
|
||||
_Logger.Warn("Invalid SQL Query for Counting Data in Profile [{0}]: [{1}]", oProfile.Guid, oCountCommand)
|
||||
End Try
|
||||
@ -412,6 +420,7 @@ Public Class ProfileFilter
|
||||
|
||||
_Logger.Debug("Documents returned from search: [{0}]", oResultDocs)
|
||||
Catch ex As Exception
|
||||
oProfile.ErrorMessage = ERROR_EXECUTING_COUNT_SQL_FOR_DOC_SEARCH
|
||||
_Logger.Error(ex)
|
||||
_Logger.Warn("Invalid SQL Query for Counting Data in Profile [{0}]: [{1}]", oProfile.Guid, oCountCommand)
|
||||
End Try
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user