//get the data from the source
try{
//cache these features in a local feature collection while we deal with them
SimpleFeatureCollection localSource = new MemoryFeatureCollection(getSchema());
fromSource = this.fs.getFeatures(filter);
localSource.addAll(fromSource);
fromSource = localSource;
}catch (Exception ex){
//something happened getting data from source
//return what we have from the cache
logger.log(Level.INFO, "Error getting data for cache from source feature store.", ex);