catch errors on SEB Settings value init for every single value

This commit is contained in:
anhefti 2021-08-26 14:54:51 +02:00
parent 88b2311e08
commit 40102be281

View file

@ -293,14 +293,22 @@ public final class ViewContext {
} }
void setValuesToInputFields(final Collection<ConfigurationValue> values) { void setValuesToInputFields(final Collection<ConfigurationValue> values) {
this.inputFieldMapping try {
.values() this.inputFieldMapping
.forEach(field -> { .values()
final ConfigurationValue initValue = field.initValue(values); .forEach(field -> {
if (initValue != null) { try {
this.valueChangeListener.notifyGUI(this, field.getAttribute(), initValue); final ConfigurationValue initValue = field.initValue(values);
} if (initValue != null) {
}); this.valueChangeListener.notifyGUI(this, field.getAttribute(), initValue);
}
} catch (final Exception e) {
log.error("Failed to initialize SEB setting: {}", field.getAttribute(), e);
}
});
} catch (final Exception e) {
log.error("Unexpected error while initialize SEB settings: ", e);
}
} }
/** Removes all registered InputFields with the given attribute ids /** Removes all registered InputFields with the given attribute ids