Skip to content

Commit

Permalink
Fixing handling of some runtime exception in resource lists
Browse files Browse the repository at this point in the history
  • Loading branch information
semancik committed Jan 21, 2015
1 parent 043a73a commit 804fefb
Showing 1 changed file with 14 additions and 1 deletion.
Expand Up @@ -1567,7 +1567,20 @@ private <T extends ObjectType> void postProcessObjectTypes(Collection<T> objectT

private <T extends ObjectType> void postProcessObjects(Collection<PrismObject<T>> objects, GetOperationOptions options, OperationResult result) throws SecurityViolationException, SchemaException {
for (PrismObject<T> object: objects) {
postProcessObject(object, options, result);
OperationResult subresult = new OperationResult(ModelController.class.getName()+".postProcessObject");
try {
postProcessObject(object, options, subresult);
} catch (IllegalArgumentException|IllegalStateException|SchemaException|SecurityViolationException e) {
LOGGER.error("Error post-processing object {}: {}", new Object[]{object, e.getMessage(), e});
OperationResultType fetchResult = object.asObjectable().getFetchResult();
if (fetchResult == null) {
fetchResult = subresult.createOperationResultType();
object.asObjectable().setFetchResult(fetchResult);
} else {
fetchResult.getPartialResults().add(subresult.createOperationResultType());
}
fetchResult.setStatus(OperationResultStatusType.FATAL_ERROR);
}
}
}

Expand Down

0 comments on commit 804fefb

Please sign in to comment.