CSSParserContext.getContext().destroy();
final CSSDeclarationRule styleRule = handler.getStyleRule();
if (styleRule == null)
{
throw new ResourceCreationException("Damn, the style rule is null");
}
return new CompoundResource(data.getKey(), dependencies, styleRule, getFactoryType());
}
catch (CSSParserInstantiationException e)
{
throw new ResourceCreationException("Failed to parse the stylesheet.");
}
catch (IOException e)
{
throw new ResourceLoadingException("Failed to load the stylesheet.");
}