@@ -258,7 +258,7 @@ private static void generateAssetsFile(Path tmpdir, String assetsPath) {
258258 if (!fonts .contains (new JsonPrimitive (newName ))) {
259259 fonts .add (newName );
260260 }
261-
261+
262262 Files .write (
263263 tmpdir .resolve ("hashed_assets" ).resolve (newName ),
264264 newContent .getBytes (),
@@ -284,6 +284,9 @@ private static void generateAssetsFile(Path tmpdir, String assetsPath) {
284284 );
285285 }
286286 }
287+ } catch (JsonSyntaxException e ) {
288+ log .error ("Invalid JSON in file " + f .getFileName () + " at " + f .toString ().replaceAll ("^" + tmpdir .toString (), "" ));
289+ e .printStackTrace ();
287290 } catch (IOException e ) {
288291 e .printStackTrace ();
289292 }
@@ -526,8 +529,8 @@ private void checkQuestionsTypeValidity(GameConfig gameConfig, QuestionConfig qu
526529 throw new MissingConfigException ("An optimization game must have a sorting_order property in config.ini." );
527530 } else if (!"ASC" .equalsIgnoreCase (questionConfig .getSortingOrder ())
528531 && !"DESC" .equalsIgnoreCase (questionConfig .getSortingOrder ())) {
529- throw new MissingConfigException ("The sorting order for an optimization game must be ASC (ascendant) or DESC (descendant)" );
530- }
532+ throw new MissingConfigException ("The sorting order for an optimization game must be ASC (ascendant) or DESC (descendant)" );
533+ }
531534 }
532535
533536 switch (gameConfig .getGameType ()) {
@@ -679,7 +682,8 @@ public void handleRequest(HttpServerExchange exchange) throws Exception {
679682 }
680683
681684 exchange .setStatusCode (StatusCodes .OK );
682- } if (exchange .getRelativePath ().equals ("/stub" )) {
685+ }
686+ if (exchange .getRelativePath ().equals ("/stub" )) {
683687 File stubFile = sourceFolderPath .resolve ("config/stub.txt" ).toFile ();
684688 if (exchange .getRequestMethod ().equalToString ("GET" )) {
685689 String stub = FileUtils .readFileToString (stubFile , StandardCharsets .UTF_8 );
0 commit comments