Skip to content

Commit

Permalink
Change 'invalid map' warning to be silent. (#12748)
Browse files Browse the repository at this point in the history
The warning is very prominent and persistent.

This update logs the warning in the background without a pop-up.

A prominent popup would be okay if it were easily fixed (eg:
the offending map deleted). Short of that, we're just making the
warning quiet.
  • Loading branch information
DanVanAtta authored Jul 23, 2024
1 parent 768be30 commit 259d96e
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ static Optional<MapDescriptionYaml> parse(final Path ymlFile, final InputStream
.build();

if (!mapDescriptionYaml.isValid(ymlFile)) {
log.warn(
"Invalid map description YML (map.yml) file detected: {}\n"
log.info(
"Warning: Invalid map description YML (map.yml) file detected: {}\n"
+ "Check the file carefully and correct any mistakes.\n"
+ "If this is a map you downloaded, please contact TripleA.\n"
+ "Data parsed:\n"
Expand All @@ -75,8 +75,8 @@ static Optional<MapDescriptionYaml> parse(final Path ymlFile, final InputStream
}
return Optional.of(mapDescriptionYaml);
} catch (final ClassCastException | InvalidYamlFormatException e) {
log.warn(
"Invalid map description YML (map.yml) file detected: {}.\n"
log.info(
"Warning: Invalid map description YML (map.yml) file detected: {}.\n"
+ "If this is a map you downloaded, please contact TripleA.\n"
+ "{}",
ymlFile.toAbsolutePath(),
Expand Down

0 comments on commit 259d96e

Please sign in to comment.