log errors from validateHostingAssets via logError( () -> ...) instead of try catch
This commit is contained in:
parent
22f493be73
commit
6b112df592
@ -652,14 +652,12 @@ public class ImportHostingAssets extends ImportOfficeData {
|
||||
|
||||
void validateHostingAssets(final Map<Integer, HsHostingAssetRealEntity> assets) {
|
||||
assets.forEach((id, ha) -> {
|
||||
try {
|
||||
logError(() ->
|
||||
new HostingAssetEntitySaveProcessor(em, ha)
|
||||
.preprocessEntity()
|
||||
.validateEntity()
|
||||
.prepareForSave();
|
||||
} catch (final Exception exc) {
|
||||
errors.add("validation failed for id:" + id + "( " + ha + "): " + exc.getMessage());
|
||||
}
|
||||
.prepareForSave()
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user