jj; endless errors pt. 2

This commit is contained in:
Jonathan Jenne
2018-06-26 17:08:20 +02:00
parent 65b5ac95e9
commit 531fba3cbc
2 changed files with 52 additions and 47 deletions

View File

@@ -216,9 +216,8 @@ Public Class ClassDatabase
Public Shared Sub CatchDatabaseTimeout(ex As SqlException, sql_command As String)
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
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("#SQL: " & sql_command, False)