mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 00:14:35 +03:00
dispatch: prompt 'eden doctor' for TApplicationException
Summary: Many people hit TApplicationException recently. Most of them can be fixed by `eden doctor`. Instead of crashing and showing an unhelpful backtrace, show a shorter error message and prompt the user to run `eden doctor`. Reviewed By: fanzeyi Differential Revision: D18609445 fbshipit-source-id: 5492fa92008cb33e1122b72b48d0858db0d5f994
This commit is contained in:
parent
31c07393a8
commit
9027d90624
@ -256,6 +256,12 @@ def callcatch(ui, func):
|
||||
return inst.code
|
||||
except socket.error as inst:
|
||||
ui.warn(_("%s\n") % inst.args[-1], error=_("abort"))
|
||||
except Exception as e:
|
||||
if type(e).__name__ == "TApplicationException":
|
||||
ui.warn(_("ThriftError: %s\n") % e, error=_("abort"))
|
||||
ui.warn(_("(try 'eden doctor' to diagnose this issue)\n"))
|
||||
else:
|
||||
raise
|
||||
|
||||
return -1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user