throw new OpenGammaRuntimeException("Invalid Freemarker template location: " + location);
}
String prefix = prefixAndBase[0].trim();
String base = prefixAndBase[1].trim();
if (SERVLET_CONTEXT.equals(prefix)) {
templateLoaders.add(new WebappTemplateLoader(servletContext, base));
} else if (FILE.equals(prefix)) {
try {
templateLoaders.add(new FileTemplateLoader(new File(base)));
} catch (IOException e) {
throw new OpenGammaRuntimeException("Unable to load Freemarker templates from " + base, e);