Mercurial > public > mercurial-scm > hg
diff mercurial/scmutil.py @ 32041:38963a53ab0d
dispatch: print traceback in scmutil.callcatch() if --traceback specified
Otherwise, traceback wouldn't be printed for a known exception occurred in
worker processes.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 15 Apr 2017 13:02:34 +0900 |
parents | f23d579a5a04 |
children | 0d892d820a51 |
line wrap: on
line diff
--- a/mercurial/scmutil.py Sat Apr 15 12:58:06 2017 +0900 +++ b/mercurial/scmutil.py Sat Apr 15 13:02:34 2017 +0900 @@ -142,7 +142,11 @@ and return an exit code accordingly. does not handle all exceptions. """ try: - return func() + try: + return func() + except: # re-raises + ui.traceback() + raise # Global exception handling, alphabetically # Mercurial-specific first, followed by built-in and library exceptions except error.LockHeld as inst: