mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-09-27 22:27:27 +02:00
Catch Throwables instead of Exceptions while (un)marshalling flags
This commit is contained in:
parent
3879772103
commit
e98196af40
@ -48,7 +48,7 @@ public static Map<String, Object> marshal(Map<Flag<?>, Object> values) {
|
||||
for (Entry<Flag<?>, Object> entry : values.entrySet()) {
|
||||
try {
|
||||
rawValues.put(entry.getKey().getName(), marshal(entry.getKey(), entry.getValue()));
|
||||
} catch (Exception e) {
|
||||
} catch (Throwable e) {
|
||||
log.log(Level.WARNING, "Failed to marshal flag value for " + entry.getKey() + "; value is " + entry.getValue(), e);
|
||||
}
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ public Map<Flag<?>, Object> unmarshal(Map<String, Object> rawValues, boolean cre
|
||||
} else {
|
||||
log.warning("Failed to parse flag '" + flag.getName() + "' with value '" + entry.getValue() + "'");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
} catch (Throwable e) {
|
||||
log.log(Level.WARNING, "Failed to unmarshal flag value for " + flag, e);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user