From 69a5f54991987e348c57ed3abf363289352a7976 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Wed, 31 Oct 2012 16:58:48 +0000 Subject: [PATCH] Revert "Introduce base exception classes" This reverts commit 7486ca41531eba0d4a11eebcd5c3545397146c14 --- git-review | 18 ++---------------- git-review.1 | 12 ------------ 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/git-review b/git-review index 86abd0c3..829e111f 100755 --- a/git-review +++ b/git-review @@ -59,11 +59,7 @@ class colors: reset = '\033[0m' -class GitReviewException(Exception): - pass - - -class CommandFailed(GitReviewException): +class CommandFailed(Exception): def __init__(self, *args): Exception.__init__(self, *args) @@ -82,16 +78,6 @@ The following command failed with exit code %(rc)d -----------------------""" % self.quickmsg -class ChangeSetException(GitReviewException): - - def __init__(self, e): - GitReviewException.__init__(self) - self.e = str(e) - - def __str__(self): - return self.__doc__ % self.e - - def run_command_status(*argv, **env): if VERBOSE: print(datetime.datetime.now(), "Running:", " ".join(argv)) @@ -875,6 +861,6 @@ def main(): if __name__ == "__main__": try: main() - except GitReviewException, e: + except CommandFailed, e: print(e) sys.exit(e.EXIT_CODE) diff --git a/git-review.1 b/git-review.1 index bfc13f6a..90c86205 100644 --- a/git-review.1 +++ b/git-review.1 @@ -108,18 +108,6 @@ defaultremote=review defaultrebase=0 .Ed .Pp -.Sh DIAGNOSTICS -.Pp -Normally, exit status is 0 if executed successfully. -Exit status 1 indicates general error, sometimes more -specific error codes are available: -.Bl -tag -width 999 -.It 2 -Gerrit -.Ar commit-msg -hook could not be successfully installed. -.El -.Pp .Sh EXAMPLES To fetch a remote change number 3004: .Pp