reporting node rendering errors using reference to node’s token
This commit is contained in:
@@ -3,6 +3,11 @@ import Spectre
|
||||
|
||||
|
||||
class ErrorNode : NodeType {
|
||||
let token: Token?
|
||||
init(token: Token? = nil) {
|
||||
self.token = token
|
||||
}
|
||||
|
||||
func render(_ context: Context) throws -> String {
|
||||
throw TemplateSyntaxError("Custom Error")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user