Class var4 = ((TemplateElement)this).getParser().getCustomTagClass(((TemplateTagElement)this).getTagName());
if (var4 != null) {
try {
var3 = var4.newInstance();
} catch (Exception var11) {
throw new TemplateException(1005, "Error attempting to create a custom tag object for tag " + "named '" + ((TemplateTagElement)this).getTagName() + "'. The class registered " + "for the tag is '" + var4.getName() + "'.");
throw new TemplateException(1005, "Error attempting to create a custom tag object for the " + ((TemplateTagElement)this).getTagName() + " tag (The CLASS attribute " + "for the tag is '" + var5 + "'.");
}
if (!(var3 instanceof TemplateCustomTag)) {
throw new TemplateException(1000, "The CLASS attribute of the " + ((TemplateTagElement)this).getTagName() + " tag specifies " + "a class (" + var5 + ") which does not implement " + "the TemplateCodeGenerator interface.");