cacheKey.getGroupName(), cacheKey.getType());
// find processed result for a group
final WroModel model = modelFactory.create();
final Group group = new WroModelInspector(model).getGroupByName(cacheKey.getGroupName());
if (group == null) {
throw new WroRuntimeException("No such group available in the model: " + cacheKey.getGroupName());
}
final Group filteredGroup = group.collectResourcesOfType(cacheKey.getType());
if (filteredGroup.getResources().isEmpty()) {
LOG.debug("No resources found in group: {} and resource type: {}", group.getName(), cacheKey.getType());
if (!context.getConfig().isIgnoreEmptyGroup()) {
throw new WroRuntimeException("No resources found in group: " + group.getName());
}
}
final String result = preProcessorExecutor.processAndMerge(filteredGroup.getResources(), cacheKey.isMinimize());
return applyPostProcessors(cacheKey, result);
} catch (final IOException e) {
throw new WroRuntimeException("Exception while merging resources: " + e.getMessage(), e).logError();
} finally {
callbackRegistry.onProcessingComplete();
}
}