Skip to content

Commit db2caad

Browse files
authoredApr 29, 2024
Merge pull request #1578 from dimagi/jt/EoF-error-handling-fix
Log instead of blocking app for EoF errors
2 parents f6aca9d + 2b45c9e commit db2caad

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎src/main/java/org/commcare/formplayer/services/MenuSessionFactory.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public void rebuildSessionFromFrame(MenuSession menuSession, CaseSearchHelper ca
115115
}
116116
}
117117
if (currentStep == null && processedStepsCount != steps.size()) {
118-
checkAndThrowCommandIDMatchError(steps, processedSteps, options);
118+
checkAndLogCommandIDMatchError(steps, processedSteps, options);
119119
}
120120
} else if (screen instanceof EntityScreen) {
121121
EntityScreen entityScreen = (EntityScreen)screen;
@@ -247,7 +247,7 @@ private MenuSession performInstall(InstallRequestBean bean) throws Exception {
247247
);
248248
}
249249

250-
private void checkAndThrowCommandIDMatchError(Vector<StackFrameStep> steps, List<StackFrameStep> processedSteps,
250+
private void checkAndLogCommandIDMatchError(Vector<StackFrameStep> steps, List<StackFrameStep> processedSteps,
251251
MenuDisplayable[] options) throws CommCareSessionException {
252252
Vector<StackFrameStep> unprocessedSteps = new Vector<>();
253253
for (StackFrameStep step : steps) {
@@ -266,7 +266,7 @@ private void checkAndThrowCommandIDMatchError(Vector<StackFrameStep> steps, List
266266
for (StackFrameStep step : steps) {
267267
stepIDJoiner.add(step.getId());
268268
}
269-
throw new CommCareSessionException(
269+
log.error(
270270
"Match Error: Steps " + stepIDJoiner.toString() +
271271
" do not contain a valid option " + optionsIDJoiner.toString()
272272
);

0 commit comments

Comments
 (0)