mirror of
https://github.com/GeyserMC/Geyser.git
synced 2025-01-23 00:41:59 +01:00
Improve predicate reading error handling
This commit is contained in:
parent
fe8336a2b1
commit
f44f368f96
1 changed files with 3 additions and 7 deletions
|
@ -195,13 +195,9 @@ public class MappingsReader_v2 extends MappingsReader {
|
|||
if (node.isObject()) {
|
||||
readPredicate(builder, node);
|
||||
} else if (node.isArray()) {
|
||||
node.forEach(predicate -> {
|
||||
try {
|
||||
readPredicate(builder, predicate);
|
||||
} catch (InvalidCustomMappingsFileException e) {
|
||||
GeyserImpl.getInstance().getLogger().error("Error in reading predicate", e); // TODO log this better
|
||||
}
|
||||
});
|
||||
for (JsonNode predicate : node) {
|
||||
readPredicate(builder, predicate);
|
||||
}
|
||||
} else {
|
||||
throw new InvalidCustomMappingsFileException("Expected predicate key to be a list of predicates or a predicate");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue