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>
This commit is contained in:
Jason Chang authored and LUCI committed 2023-08-10 23:46:31 +00:00
1 parent f0aeb220de
commit 1a3612fe6d
10 files changed
+251 -122

No files matched your search

+8
View File
@@ -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."""