##// END OF EJS Templates
error: Add a hint argument to RepoError...
Pierre-Yves David -
r14761:1a9256cd stable
parent child Browse files
Show More
@@ -125,6 +125,8 b' def _runcatch(req):'
125 commands.help_(ui, 'shortlist')
125 commands.help_(ui, 'shortlist')
126 except error.RepoError, inst:
126 except error.RepoError, inst:
127 ui.warn(_("abort: %s!\n") % inst)
127 ui.warn(_("abort: %s!\n") % inst)
128 if inst.hint:
129 ui.warn(_("(%s)\n") % inst.hint)
128 except error.ResponseError, inst:
130 except error.ResponseError, inst:
129 ui.warn(_("abort: %s") % inst.args[0])
131 ui.warn(_("abort: %s") % inst.args[0])
130 if not isinstance(inst.args[1], basestring):
132 if not isinstance(inst.args[1], basestring):
@@ -43,7 +43,9 b' class ParseError(Exception):'
43 'Exception raised when parsing config files (msg[, pos])'
43 'Exception raised when parsing config files (msg[, pos])'
44
44
45 class RepoError(Exception):
45 class RepoError(Exception):
46 pass
46 def __init__(self, *args, **kw):
47 Exception.__init__(self, *args)
48 self.hint = kw.get('hint')
47
49
48 class RepoLookupError(RepoError):
50 class RepoLookupError(RepoError):
49 pass
51 pass
General Comments 0
You need to be logged in to leave comments. Login now