fixed reporting errors in child templates

This commit is contained in:
Ilya Puchka
2017-12-25 00:34:13 +01:00
parent 9a28142fa6
commit c486617854
3 changed files with 95 additions and 51 deletions

View File

@@ -99,7 +99,7 @@ open class SimpleErrorReporter: ErrorReporter {
return TemplateSyntaxError(reason: (error as? TemplateSyntaxError)?.reason ?? "\(error)",
lexeme: (error as? TemplateSyntaxError)?.lexeme,
template: context.template,
template: (error as? TemplateSyntaxError)?.template ?? context.template,
parentError: (error as? TemplateSyntaxError)?.parentError
)
}