Code Review
/
ric-plt
/
a1.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Adding note on who approved committer
[ric-plt/a1.git]
/
a1
/
exceptions.py
diff --git
a/a1/exceptions.py
b/a1/exceptions.py
index
055cafb
..
b7d1244
100644
(file)
--- a/
a1/exceptions.py
+++ b/
a1/exceptions.py
@@
-19,25
+19,29
@@
Custom Exceptions
"""
"""
-class
MessageSendFailure(Base
Exception):
- pass
+class
A1Error(
Exception):
+ """A base class for A1 exceptions."""
+ def __init__(self, message):
+ # Call the base class constructor with the parameters it needs
+ super(A1Error, self).__init__(message)
-class ExpectedAckNotReceived(BaseException):
- pass
+class CantDeleteNonEmptyType(A1Error):
+ """tried to delete a type that isn't empty"""
-class PolicyNotFound(BaseException):
- pass
+class PolicyInstanceNotFound(A1Error):
+ """a policy instance cannot be found"""
-class MissingRmrString(BaseException):
- pass
+class PolicyTypeNotFound(A1Error):
+ """a policy type instance cannot be found"""
-class MissingManifest(BaseException):
- pass
+class PolicyTypeAlreadyExists(A1Error):
+ """a policy type already exists and replace not supported at this time"""
-class MissingRmrMapping(BaseException):
- pass
+
+class PolicyTypeIdMismatch(A1Error):
+ """a policy type request path ID differs from its body ID"""