cancel indexing when directory cannot be created

This commit is contained in:
Jonathan Jenne
2020-05-11 11:31:03 +02:00
parent f2468be109
commit 349671c2d3

View File

@@ -476,7 +476,7 @@ Public Class frmIndex
Case "M"
LOGGER.Debug("NameGenerieren: Manueller Index wird geprüft...")
Dim Indexname = oElement.Value.Substring(3, oElement.Value.Length - 4)
Dim optional_index As Boolean = ClassDatabase.Execute_Scalar("SELECT OPTIONAL FROM TBDD_INDEX_MAN WHERE DOK_ID = " & CURRENT_DOKART_ID & " AND UPPER(NAME) = UPPER('" & Indexname & "')", MyConnectionString, True)
Dim optional_index As Boolean = ClassDatabase.Execute_Scalar($"SELECT OPTIONAL FROM TBDD_INDEX_MAN WHERE DOK_ID = {CURRENT_DOKART_ID} AND UPPER(NAME) = UPPER('{Indexname}')", MyConnectionString, True)
Dim oManValue As String = GetManIndex_Value(Indexname, "FILE", optional_index)
If oManValue <> String.Empty Then
Dim firstVectorValue = oManValue.Split(ClassConstants.VECTORSEPARATOR).First()
@@ -637,6 +637,7 @@ Public Class frmIndex
Catch ex As Exception
LOGGER.Info("Unexpected Error in 'Name_Generieren' - Error: " & vbNewLine & ex.Message & vbNewLine & "Directory.CreateDirectory(" & path & ")")
LOGGER.Error(ex.Message)
err = True
MsgBox("Unexpected Error in 'Name_Generieren' - Error: " & vbNewLine & ex.Message & vbNewLine & "Directory.CreateDirectory(" & path & ")", MsgBoxStyle.Critical)
End Try