Mercurial > public > mercurial-scm > hg-stable
diff mercurial/dispatch.py @ 32379:9c023179e8d0
error: add hint to ProgrammingError
As the hint isn't shown by the default exception handler, we need to print
it manually. I've copied the "** " style from _exceptionwarning().
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 14 May 2017 15:41:27 +0900 |
parents | bd872f64a8ba |
children | c942c83ac2ec |
line wrap: on
line diff
--- a/mercurial/dispatch.py Mon May 08 22:14:56 2017 +0900 +++ b/mercurial/dispatch.py Sun May 14 15:41:27 2017 +0900 @@ -162,6 +162,11 @@ ret = None try: ret = _runcatch(req) + except error.ProgrammingError as inst: + req.ui.warn(_('** ProgrammingError: %s\n') % inst) + if inst.hint: + req.ui.warn(_('** (%s)\n') % inst.hint) + raise except KeyboardInterrupt as inst: try: if isinstance(inst, error.SignalInterrupt):