return null if no template could be found

This commit is contained in:
Sebastian Sdorra
2012-08-18 12:02:07 +02:00
parent 428b7973fe
commit ff362ead93
3 changed files with 127 additions and 7 deletions

View File

@@ -30,6 +30,7 @@
*/
package sonia.scm.template;
//~--- non-JDK imports --------------------------------------------------------
@@ -129,6 +130,12 @@ public class ServletMustacheFactory extends DefaultMustacheFactory
logger.warn("could not find resource {}", resourceName);
}
if (reader == null)
{
throw new MustacheTemplateNotFoundException(
"could not find template for resource ".concat(resourceName));
}
return reader;
}