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) {
|
void validateHostingAssets(final Map<Integer, HsHostingAssetRealEntity> assets) {
|
||||||
assets.forEach((id, ha) -> {
|
assets.forEach((id, ha) -> {
|
||||||
try {
|
logError(() ->
|
||||||
new HostingAssetEntitySaveProcessor(em, ha)
|
new HostingAssetEntitySaveProcessor(em, ha)
|
||||||
.preprocessEntity()
|
.preprocessEntity()
|
||||||
.validateEntity()
|
.validateEntity()
|
||||||
.prepareForSave();
|
.prepareForSave()
|
||||||
} catch (final Exception exc) {
|
);
|
||||||
errors.add("validation failed for id:" + id + "( " + ha + "): " + exc.getMessage());
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user