public void onIterationException(Exception ex) {
exceptions.add(ex);
}
};
// create new query builder specific for the repository
QueryBuilder queryBuilder = repository.newQueryBuilder(iterationContext);
// get native resource; this may throw exception(s) stored later in the
// placeholder
Native nativeResource = queryBuilder.getNativeResource();
// assure there are no exceptions; if there are any, throw the first one
if (exceptions.size() > 0) {
throw exceptions.get(0);
}
return nativeResource;