diff --git a/ToolCollection/frmNIHauptseite.vb b/ToolCollection/frmNIHauptseite.vb index 31e405c..aeaae59 100644 --- a/ToolCollection/frmNIHauptseite.vb +++ b/ToolCollection/frmNIHauptseite.vb @@ -1913,11 +1913,16 @@ Public Class frmNIHauptseite If oUnexpectedError = False And aktivesProfil.NachbearbeitungAD = True And unvollstaendig = False Then _Logger.Debug("Nachbearbeitung AD ist aktiviert") Dim sw As New ClassStopwatch("AD-Rework") - Nachbearbeitung_AD(pMyWMDoc) + Dim adReworkOk As Boolean = Nachbearbeitung_AD(pMyWMDoc) Dim msg = sw.Done If msg <> "" Then Stopwatch1 += vbNewLine & $"{msg}" End If + If adReworkOk = False Then + _Logger.Warn($"## Nachbearbeitung AD für [{pMyWMDoc.aName}] fehlgeschlagen - Error-Index wird gesetzt") + File_SetBooleanIndex(True, pMyWMDoc, aktivesProfil.IndexValidation) + SetErrorMeldung("Rechtevergabe fehlgeschlagen", pMyWMDoc, aktivesProfil.IndexFehler) + End If Else If aktivesProfil.NachbearbeitungAD = True Then _Logger.Info($"Nachbearbeitung AD ist aktiviert aber Unexpected Error ist{oUnexpectedError.ToString}") @@ -2359,7 +2364,9 @@ Public Class frmNIHauptseite End If i += 1 Catch ex As Exception - + _Logger.Error(ex) + _erfolgreich = False + Exit For End Try Next