summaryrefslogtreecommitdiffstats
path: root/error.py
diff options
context:
space:
mode:
Diffstat (limited to 'error.py')
-rw-r--r--error.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/error.py b/error.py
index cb3b7258..78c5c0e0 100644
--- a/error.py
+++ b/error.py
@@ -57,6 +57,15 @@ class UploadError(Exception):
57 def __str__(self): 57 def __str__(self):
58 return self.reason 58 return self.reason
59 59
60class DownloadError(Exception):
61 """Cannot download a repository.
62 """
63 def __init__(self, reason):
64 self.reason = reason
65
66 def __str__(self):
67 return self.reason
68
60class NoSuchProjectError(Exception): 69class NoSuchProjectError(Exception):
61 """A specified project does not exist in the work tree. 70 """A specified project does not exist in the work tree.
62 """ 71 """
@@ -68,6 +77,18 @@ class NoSuchProjectError(Exception):
68 return 'in current directory' 77 return 'in current directory'
69 return self.name 78 return self.name
70 79
80
81class InvalidProjectGroupsError(Exception):
82 """A specified project is not suitable for the specified groups
83 """
84 def __init__(self, name=None):
85 self.name = name
86
87 def __str__(self):
88 if self.Name is None:
89 return 'in current directory'
90 return self.name
91
71class RepoChangedException(Exception): 92class RepoChangedException(Exception):
72 """Thrown if 'repo sync' results in repo updating its internal 93 """Thrown if 'repo sync' results in repo updating its internal
73 repo or manifest repositories. In this special case we must 94 repo or manifest repositories. In this special case we must
@@ -75,3 +96,10 @@ class RepoChangedException(Exception):
75 """ 96 """
76 def __init__(self, extra_args=[]): 97 def __init__(self, extra_args=[]):
77 self.extra_args = extra_args 98 self.extra_args = extra_args
99
100class HookError(Exception):
101 """Thrown if a 'repo-hook' could not be run.
102
103 The common case is that the file wasn't present when we tried to run it.
104 """
105 pass