Changed MustacheContextException -> MustacheException.Context.

Also made data into final fields. I don't like unnecessary getters.
This commit is contained in:
Michael Bayne
2013-03-05 20:55:01 -08:00
parent c61650734d
commit 43db03a26a
4 changed files with 26 additions and 37 deletions
@@ -609,8 +609,8 @@ public class Mustache
@Override public void execute (Template tmpl, Template.Context ctx, Writer out) {
Object value = tmpl.getValueOrDefault(ctx, _name, _line);
if (value == null) {
throw new MustacheContextException(
"No key, method or field with name '" + _name + "' on line " + _line, _name, _line);
throw new MustacheException.Context("No key, method or field with name '" + _name +
"' on line " + _line, _name, _line);
}
String text = String.valueOf(value);
write(out, _escapeHTML ? escapeHTML(text) : text);