jj; endless errors pt. 2
This commit is contained in:
parent
65b5ac95e9
commit
531fba3cbc
@ -216,9 +216,8 @@ Public Class ClassDatabase
|
|||||||
Public Shared Sub CatchDatabaseTimeout(ex As SqlException, sql_command As String)
|
Public Shared Sub CatchDatabaseTimeout(ex As SqlException, sql_command As String)
|
||||||
Dim FatalErrors As New List(Of Integer) From {-1, -2, 121}
|
Dim FatalErrors As New List(Of Integer) From {-1, -2, 121}
|
||||||
|
|
||||||
If DatabaseConnectionTimeout = False And FatalErrors.Contains(ex.Number) Then
|
If FatalErrors.Contains(ex.Number) Then
|
||||||
DatabaseConnectionTimeout = True
|
DatabaseConnectionTimeout = True
|
||||||
MsgBox($"Database could not be reached. Global Indexer will NOT work without a database!{vbCrLf}{vbCrLf}Please check your connection and restart.", MsgBoxStyle.Critical, "Critical Error")
|
|
||||||
|
|
||||||
ClassLogger.Add("Network timeout error in Return_Datatable: " & ex.Message, True)
|
ClassLogger.Add("Network timeout error in Return_Datatable: " & ex.Message, True)
|
||||||
ClassLogger.Add("#SQL: " & sql_command, False)
|
ClassLogger.Add("#SQL: " & sql_command, False)
|
||||||
|
|||||||
@ -671,10 +671,13 @@ Public Class frmStart
|
|||||||
Private Sub TimerFolderWatch_Tick(sender As Object, e As EventArgs) Handles TimerFolderWatch.Tick
|
Private Sub TimerFolderWatch_Tick(sender As Object, e As EventArgs) Handles TimerFolderWatch.Tick
|
||||||
If ClassDatabase.DatabaseConnectionTimeout = True Then
|
If ClassDatabase.DatabaseConnectionTimeout = True Then
|
||||||
TimerFolderWatch.Enabled = False
|
TimerFolderWatch.Enabled = False
|
||||||
ClassLogger.Add(">> Timer stopped because of database timeout error!", False)
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
Dim result = MsgBox($"Database could not be reached. Global Indexer will NOT work without a database!{vbCrLf}{vbCrLf}Please check your connection.{vbCrLf}The Application will exit now.", MsgBoxStyle.Critical, "Critical Error")
|
||||||
|
|
||||||
|
If result = MsgBoxResult.Ok Then
|
||||||
|
Application.ExitThread()
|
||||||
|
End If
|
||||||
|
Else
|
||||||
Try
|
Try
|
||||||
If FW_started = True Or FWSCAN_started = True Then
|
If FW_started = True Or FWSCAN_started = True Then
|
||||||
'Prüfen ob alle Files abgearbeitet wurden
|
'Prüfen ob alle Files abgearbeitet wurden
|
||||||
@ -719,6 +722,9 @@ Public Class frmStart
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox("Error in Work FolderWatch-File:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
MsgBox("Error in Work FolderWatch-File:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||||
End Try
|
End Try
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub TimerClose3Minutes_Tick(sender As Object, e As EventArgs) Handles TimerClose3Minutes.Tick
|
Private Sub TimerClose3Minutes_Tick(sender As Object, e As EventArgs) Handles TimerClose3Minutes.Tick
|
||||||
If LICENSE_EXPIRED = True Or LICENSE_COUNT < UserLoggedin Then
|
If LICENSE_EXPIRED = True Or LICENSE_COUNT < UserLoggedin Then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user