[Bug 5289] New: improve exception handling UX
mercurial-bugs at selenic.com
mercurial-bugs at selenic.com
Fri Jul 8 16:57:00 UTC 2016
https://bz.mercurial-scm.org/show_bug.cgi?id=5289
Bug ID: 5289
Summary: improve exception handling UX
Product: Mercurial
Version: unspecified
Hardware: PC
OS: Windows
Status: UNCONFIRMED
Severity: feature
Priority: wish
Component: Mercurial
Assignee: bugzilla at selenic.com
Reporter: timeless at gmail.com
CC: mercurial-devel at selenic.com
*** failed to import extension rebase: unexpected unindent (rebase.py, line
676)
** Unknown exception encountered with possibly-broken third-party extension
hgbb
** which supports versions unknown of Mercurial.
** Please disable hgbb and try your action again.
** If that fixes the bug please report it to the extension author.
** Python 2.7.8 (default, Oct 7 2015, 09:24:26) [GCC 4.9.2 20150212 (Red Hat
4.9.2-6)]
** Mercurial Distributed SCM (version
3.8.23.8.2+0-4b892ac5a676+0c37de12e489+20160708)
** Extensions loaded: strip, mq, histedit, color, blackbox, pager, shelve,
topics, remotebranches, evolve, hg-git, chistedit, hgbb, patchbomb
Traceback (most recent call last):
File "/home/timeless/hg/crew/hg", line 45, in <module>
mercurial.dispatch.run()
File "/home/timeless/hg/crew/mercurial/dispatch.py", line 59, in run
sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
File "/home/timeless/hg/crew/mercurial/dispatch.py", line 125, in dispatch
ret = _runcatch(req)
File "/home/timeless/hg/crew/mercurial/dispatch.py", line 204, in _runcatch
return _dispatch(req)
File "/home/timeless/hg/crew/mercurial/dispatch.py", line 742, in _dispatch
extensions.loadall(lui)
File "/home/timeless/hg/crew/mercurial/extensions.py", line 166, in loadall
_runuisetup(name, ui)
File "/home/timeless/hg/crew/mercurial/extensions.py", line 133, in
_runuisetup
uisetup(ui)
File "/home/timeless/hg/topic/hgext3rd/topic/__init__.py", line 94, in
uisetup
extensions.afterloaded('rebase', _fixrebase)
File "/home/timeless/hg/crew/mercurial/extensions.py", line 197, in
afterloaded
callback(loaded=True)
File "/home/timeless/hg/topic/hgext3rd/topic/__init__.py", line 323, in
_fixrebase
rebase = extensions.find("rebase")
File "/home/timeless/hg/crew/mercurial/extensions.py", line 55, in find
raise KeyError(name)
KeyError: 'rebase'
I have a slightly modified tip w/ a broken (hgext/rebase.py).
I'm more interested in the poor error handling flow.
The last thing I see is "KeyError: 'rebase'" which isn't helpful.
I'd like to suggest that we stick the suggestion at the end. We should also try
very hard to favor the extension we're loading as opposed to randomly fingering
an extension.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list