Catch Throwables instead of Exceptions while (un)marshalling flags

This commit is contained in:
JOO200 2020-11-08 19:57:39 +01:00 committed by wizjany
parent 3879772103
commit e98196af40
2 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@ public final class FlagUtil {
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);
}
}

View File

@ -144,7 +144,7 @@ public class SimpleFlagRegistry implements FlagRegistry {
} 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);
}
}