##// END OF EJS Templates
templater: raise error for unknown func...
Sean Farley -
r20857:6eb55310 stable
parent child Browse files
Show More
@@ -212,6 +212,7 b' def buildfunc(exp, context):'
212 raise error.ParseError(_("filter %s expects one argument") % n)
212 raise error.ParseError(_("filter %s expects one argument") % n)
213 f = context._filters[n]
213 f = context._filters[n]
214 return (runfilter, (args[0][0], args[0][1], f))
214 return (runfilter, (args[0][0], args[0][1], f))
215 raise error.ParseError(_("unknown function '%s'") % n)
215
216
216 def date(context, mapping, args):
217 def date(context, mapping, args):
217 if not (1 <= len(args) <= 2):
218 if not (1 <= len(args) <= 2):
@@ -1416,6 +1416,12 b' Behind the scenes, this will throw Value'
1416 abort: template filter 'datefilter' is not compatible with keyword 'author'
1416 abort: template filter 'datefilter' is not compatible with keyword 'author'
1417 [255]
1417 [255]
1418
1418
1419 Thrown an error if a template function doesn't exist
1420
1421 $ hg tip --template '{foo()}\n'
1422 hg: parse error: unknown function 'foo'
1423 [255]
1424
1419 $ cd ..
1425 $ cd ..
1420
1426
1421
1427
General Comments 0
You need to be logged in to leave comments. Login now