summaryrefslogtreecommitdiffstats
path: root/error.py
diff options
context:
space:
mode:
authorJason Chang <jasonnc@google.com>2023-08-08 14:12:53 -0700
committerLUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-08-10 23:46:31 +0000
commit1a3612fe6d347e458a53d7a9e920a91ea502e6ba (patch)
tree02b1a61f1d97e32201ea5fa309bf1f1b6050e929 /error.py
parentf0aeb220def22edfac9838288ad251f86da782c1 (diff)
downloadgit-repo-1a3612fe6d347e458a53d7a9e920a91ea502e6ba.tar.gz
Raise RepoExitError in place of sys.exit
Bug: b/293344017 Change-Id: Icae4932b00e4068cba502a5ab4a0274fd7854d9d Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/382214 Reviewed-by: Gavin Mak <gavinmak@google.com> Tested-by: Jason Chang <jasonnc@google.com> Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com> Commit-Queue: Jason Chang <jasonnc@google.com>
Diffstat (limited to 'error.py')
-rw-r--r--error.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/error.py b/error.py
index ed4a90b7..cee977f9 100644
--- a/error.py
+++ b/error.py
@@ -56,6 +56,10 @@ class RepoUnhandledExceptionError(RepoExitError):
56 self.error = error 56 self.error = error
57 57
58 58
59class SilentRepoExitError(RepoExitError):
60 """RepoExitError that should no include CLI logging of issue/issues."""
61
62
59class ManifestParseError(RepoExitError): 63class ManifestParseError(RepoExitError):
60 """Failed to parse the manifest file.""" 64 """Failed to parse the manifest file."""
61 65
@@ -125,6 +129,10 @@ class DownloadError(RepoExitError):
125 return self.reason 129 return self.reason
126 130
127 131
132class InvalidArgumentsError(RepoExitError):
133 """Invalid command Arguments."""
134
135
128class SyncError(RepoExitError): 136class SyncError(RepoExitError):
129 """Cannot sync repo.""" 137 """Cannot sync repo."""
130 138