Ensure Warlock passes the approperiate error message along with it's exceptions.
Change-Id: I966555181ab63ae50cadfd61ac38abda51f46350
This commit is contained in:
parent
a17d9391b7
commit
47c85147a5
@ -72,8 +72,8 @@ def model_factory(schema):
|
||||
mutation[key] = value
|
||||
try:
|
||||
self.validator(mutation)
|
||||
except ValidationError:
|
||||
raise InvalidOperation()
|
||||
except ValidationError, e:
|
||||
raise InvalidOperation(str(e))
|
||||
|
||||
dict.__setitem__(self, key, value)
|
||||
|
||||
@ -103,8 +103,8 @@ def model_factory(schema):
|
||||
mutation.update(other)
|
||||
try:
|
||||
self.validator(mutation)
|
||||
except ValidationError:
|
||||
raise InvalidOperation()
|
||||
except ValidationError, e:
|
||||
raise InvalidOperation(str(e))
|
||||
dict.update(self, other)
|
||||
|
||||
def iteritems(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user