ClientResponse result = new ClientResponse(handler.httpStatus, handler.triples);
result.setExpires(expiresDate);
return result;
} catch (RepositoryException e) {
log.error("error while initialising Sesame repository; classpath problem?",e);
throw new DataRetrievalException("error while initialising Sesame repository; classpath problem?",e);
} catch (ClientProtocolException e) {
log.error("HTTP client error while trying to retrieve resource {}: {}", resource, e.getMessage());
throw new DataRetrievalException("I/O error while trying to retrieve resource "+resource,e);
} catch (IOException e) {
log.error("I/O error while trying to retrieve resource {}: {}", resource, e.getMessage());
throw new DataRetrievalException("I/O error while trying to retrieve resource "+resource,e);
} catch(RuntimeException ex) {
log.error("Unknown error while trying to retrieve resource {}: {}", resource, ex.getMessage());
throw new DataRetrievalException("Unknown error while trying to retrieve resource "+resource,ex);
}
}