##// END OF EJS Templates
hgweb: trap lookup errors
Brendan Cully -
r3359:41741218 default
parent child Browse files
Show More
@@ -13,7 +13,7 b' from mercurial.demandload import demandl'
13 demandload(globals(), "re zlib ConfigParser mimetools cStringIO sys tempfile")
13 demandload(globals(), "re zlib ConfigParser mimetools cStringIO sys tempfile")
14 demandload(globals(), 'urllib')
14 demandload(globals(), 'urllib')
15 demandload(globals(), "mercurial:mdiff,ui,hg,util,archival,streamclone,patch")
15 demandload(globals(), "mercurial:mdiff,ui,hg,util,archival,streamclone,patch")
16 demandload(globals(), "mercurial:templater")
16 demandload(globals(), "mercurial:revlog,templater")
17 demandload(globals(), "mercurial.hgweb.common:get_mtime,staticfile,style_map")
17 demandload(globals(), "mercurial.hgweb.common:get_mtime,staticfile,style_map")
18 from mercurial.node import *
18 from mercurial.node import *
19 from mercurial.i18n import gettext as _
19 from mercurial.i18n import gettext as _
@@ -765,7 +765,10 b' class hgweb(object):'
765
765
766 method = getattr(self, 'do_' + cmd, None)
766 method = getattr(self, 'do_' + cmd, None)
767 if method:
767 if method:
768 method(req)
768 try:
769 method(req)
770 except (hg.RepoError, revlog.RevlogError), inst:
771 req.write(self.t("error", error=str(inst)))
769 else:
772 else:
770 req.write(self.t("error", error='No such method: ' + cmd))
773 req.write(self.t("error", error='No such method: ' + cmd))
771
774
General Comments 0
You need to be logged in to leave comments. Login now