From e61bf22c6b96c74920d91e484778f585ff987fa0 Mon Sep 17 00:00:00 2001 From: "ITC22366\\local-study-admin" <account@vr.rwth-aachen.de> Date: Thu, 31 Aug 2023 13:38:59 +0200 Subject: [PATCH] improve error handling when restoring trial data of unfinished runs --- .../Private/SFMultipleTrialDependentVariable.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/StudyFrameworkPlugin/Private/SFMultipleTrialDependentVariable.cpp b/Source/StudyFrameworkPlugin/Private/SFMultipleTrialDependentVariable.cpp index 065596e..157c444 100644 --- a/Source/StudyFrameworkPlugin/Private/SFMultipleTrialDependentVariable.cpp +++ b/Source/StudyFrameworkPlugin/Private/SFMultipleTrialDependentVariable.cpp @@ -77,7 +77,9 @@ void USFMultipleTrialDependentVariable::RecoverStudyResultsOfLine(const TArray<F //so this is the right condition //these should be in the right order, just double-check - check(FCString::Atoi(*Entries[Header.Find("Trial")]) == Values.size()) + if (FCString::Atoi(*Entries[Header.Find("Trial")]) != Values.size()) { + FSFLoggingUtils::Log("Try to recover trial #" + Entries[Header.Find("Trial")] + " while already " + FString::FromInt(Values.size()) + " trial were recovered! (probably jumped back and forth in conditions, this must not happen in a correct run!", true); + } std::vector<FString> Data; for (const FString& SubName : SubVariableNames) -- GitLab