NotFoundException implemented.
* now message could be overriden and formatted used value arg Change-Id: I6eaae41c9be07b5528e4b4fe48719369002169ab
This commit is contained in:
parent
9442494cfc
commit
5027c62a16
@ -31,9 +31,12 @@ class SavannaException(ex.ApiError):
|
||||
|
||||
class NotFoundException(SavannaException):
|
||||
|
||||
message = "Object not found"
|
||||
# It could be a various property of object which was not found
|
||||
value = None
|
||||
|
||||
def __init__(self, value):
|
||||
def __init__(self, value, message=None):
|
||||
self.code = "NOT_FOUND"
|
||||
self.value = value
|
||||
if message:
|
||||
self.message = message % value
|
||||
|
Loading…
Reference in New Issue
Block a user