##// END OF EJS Templates
templater: give slightly nicer error for unknown map entries
Matt Mackall -
r13175:09cde75e default
parent child Browse files
Show More
@@ -214,6 +214,8 b' class templater(object):'
214 214 if not t in self.cache:
215 215 try:
216 216 self.cache[t] = open(self.map[t][1]).read()
217 except KeyError, inst:
218 raise util.Abort(_('"%s" not in template map') % inst.args[0])
217 219 except IOError, inst:
218 220 raise IOError(inst.args[0], _('template file %s: %s') %
219 221 (self.map[t][1], inst.args[1]))
@@ -449,7 +449,7 b' Error if style missing key:'
449 449
450 450 $ echo 'q = q' > t
451 451 $ hg log --style ./t
452 abort: ./t: no key named 'changeset'
452 abort: "changeset" not in template map
453 453 [255]
454 454
455 455 Error if include fails:
General Comments 0
You need to be logged in to leave comments. Login now