Document any crashes from the user's text editor
Rather than failing with no information, display the child exit status and the command line we tried to use to edit a text file. There may be some useful information to help understand the crash. Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
parent
fb5c8fd948
commit
54fccd71fb
2 changed files with 14 additions and 2 deletions
5
error.py
5
error.py
|
@ -24,6 +24,11 @@ class ManifestInvalidRevisionError(Exception):
|
|||
class EditorError(Exception):
|
||||
"""Unspecified error from the user's text editor.
|
||||
"""
|
||||
def __init__(self, reason):
|
||||
self.reason = reason
|
||||
|
||||
def __str__(self):
|
||||
return self.reason
|
||||
|
||||
class GitError(Exception):
|
||||
"""Unspecified internal error from git.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue