jj: fix endless errors on db timeout \o/
This commit is contained in:
@@ -151,6 +151,11 @@ Public Class ClassFolderWatcher
|
||||
End If
|
||||
End Function
|
||||
Private Shared Sub OnCreated(source As Object, e As FileSystemEventArgs)
|
||||
If ClassDatabase.DatabaseConnectionTimeout = True Then
|
||||
ClassLogger.Add(">> File handling aborted because of database timeout error!", False)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Try
|
||||
For Each row As DataRow In DTEXCLUDE_FILES.Rows
|
||||
Dim content As String = row.Item(0).ToString.ToLower
|
||||
@@ -158,7 +163,7 @@ Public Class ClassFolderWatcher
|
||||
Exit Sub
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
Dim handleType As String
|
||||
If e.FullPath.ToLower.EndsWith(".msg") Then
|
||||
handleType = "|FW_OUTLOOK_MESSAGE|"
|
||||
@@ -172,11 +177,11 @@ Public Class ClassFolderWatcher
|
||||
Else
|
||||
ClassLogger.Add(">> Folderwatcher: File already exists:" & e.FullPath, False)
|
||||
End If
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error in folder_watch_Created")
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user