try {
new Parser(meta, contentString()).addRulesWithSelector(
Arrays.asList(new Rule.Selector(TemplateId, templateId)));
} catch (Error e) {
meta.endRuleSet().disableRules();
throw new AWGenericException(Fmt.S("Error reading rules in <m:Rules> tag in %s -- %s", template.templateName(), e));
} catch (Exception e) {
meta.endRuleSet().disableRules();
throw new AWGenericException(Fmt.S("Exception reading rules in <m:Rules> tag in %s", template.templateName()), e);
}
data.elementMap.put(this, meta.endRuleSet());