return result;
}
protected NotFoundReasoning buildNotFoundReasoning(final Repository repository, final Throwable t) {
final NotFoundReasoning reasoning = new NotFoundReasoning();
reasoning.setReasonMessage(t.getMessage());
reasoning.setThrowableType(t.getClass().getName());
if (repository != null) {
reasoning.setRepositoryId(repository.getId());
}
if (t instanceof GroupItemNotFoundException) {
final GroupItemNotFoundException ginf = (GroupItemNotFoundException) t;
reasoning.setRepositoryId(ginf.getReason().getRepository().getId());
for (Map.Entry<Repository, Throwable> r : ginf.getMemberReasons().entrySet()) {
reasoning.addNotFoundReasoning(buildNotFoundReasoning(r.getKey(), r.getValue()));
}
}
return reasoning;
}