handling unknown filter errors

This commit is contained in:
Ilya Puchka
2017-10-07 23:10:27 +02:00
parent d5f0be959f
commit e59609f140
9 changed files with 114 additions and 43 deletions

View File

@@ -11,8 +11,6 @@ class FilterExpression : Resolvable {
init(token: String, parser: TokenParser) throws {
let bits = token.characters.split(separator: "|").map({ String($0).trim(character: " ") })
if bits.isEmpty {
filters = []
variable = Variable("")
throw TemplateSyntaxError("Variable tags must include at least 1 argument")
}