{
String err = "The specified class for ParserPool ("
+ pp
+ ") does not exist (or is not accessible to the current classloader.";
log.error(err);
throw new VelocityException(err, cnfe);
}
catch (InstantiationException ie)
{
throw new VelocityException("Could not instantiate class '" + pp + "'", ie);
}
catch (IllegalAccessException ae)
{
throw new VelocityException("Cannot access class '" + pp + "'", ae);
}
if (!(o instanceof ParserPool))
{
String err = "The specified class for ParserPool ("
+ pp + ") does not implement " + ParserPool.class
+ " Velocity not initialized correctly.";
log.error(err);
throw new VelocityException(err);
}
parserPool = (ParserPool) o;
parserPool.initialize(this);
}
else
{
/*
* someone screwed up. Lets not fool around...
*/
String err = "It appears that no class was specified as the"
+ " ParserPool. Please ensure that all configuration"
+ " information is correct.";
log.error(err);
throw new VelocityException( err );
}
}