From 5a1456a98c8d793b5ed3d120eb58f7d543011e8d Mon Sep 17 00:00:00 2001 From: eliasyishak <42216813+eliasyishak@users.noreply.github.com> Date: Thu, 14 Sep 2023 10:43:36 -0400 Subject: [PATCH] Print out the required keys per survey object --- surveys/survey-validator/lib/survey_validator.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/surveys/survey-validator/lib/survey_validator.dart b/surveys/survey-validator/lib/survey_validator.dart index e5b741c..25f08a7 100644 --- a/surveys/survey-validator/lib/survey_validator.dart +++ b/surveys/survey-validator/lib/survey_validator.dart @@ -68,7 +68,8 @@ void checkJson(File contextualSurveyFile) { // Ensure that the number of keys found in each object is correct if (surveyObject.keys.length != requiredKeys.length) { throw ArgumentError( - 'There should only be ${requiredKeys.length} keys per survey object'); + 'There should only be ${requiredKeys.length} keys per survey object\n' + 'The required keys are: ${requiredKeys.join(', ')}'); } // Ensure that the keys themselves match what has been defined