[llvm] Improve error message when invalid choice count received.
@@ -123,7 +123,9 @@ Status LlvmSession::applyAction(const Action& action, bool& endOfEpisode,
case LlvmActionSpace::PASSES_ALL:
LlvmAction actionEnum;
if (action.choice_size() != 1) {
- return Status(StatusCode::INVALID_ARGUMENT, "Missing choice");
+ return Status(
+ StatusCode::INVALID_ARGUMENT,
+ fmt::format("Invalid choice count. Expected 1, received {}", action.choice_size()));
}
RETURN_IF_ERROR(util::intToEnum(action.choice(0).named_discrete_value_index(), &actionEnum));
RETURN_IF_ERROR(applyPassAction(actionEnum, actionHadNoEffect));
