From 1a3612fe6d347e458a53d7a9e920a91ea502e6ba Mon Sep 17 00:00:00 2001 From: Jason Chang Date: Tue, 8 Aug 2023 14:12:53 -0700 Subject: 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 Tested-by: Jason Chang Reviewed-by: Aravind Vasudevan Commit-Queue: Jason Chang --- error.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'error.py') 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): self.error = error +class SilentRepoExitError(RepoExitError): + """RepoExitError that should no include CLI logging of issue/issues.""" + + class ManifestParseError(RepoExitError): """Failed to parse the manifest file.""" @@ -125,6 +129,10 @@ class DownloadError(RepoExitError): return self.reason +class InvalidArgumentsError(RepoExitError): + """Invalid command Arguments.""" + + class SyncError(RepoExitError): """Cannot sync repo.""" -- cgit v1.2.3-54-g00ecf