From 54fccd71fbdc60adf99b9a9bf4712c121d4312ba Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Wed, 24 Jun 2009 07:09:51 -0700 Subject: 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 --- error.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'error.py') diff --git a/error.py b/error.py index 6b9dff44..cb3b7258 100644 --- a/error.py +++ b/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. -- cgit v1.2.3-54-g00ecf