Improve validator error handling

This commit is contained in:
Cristi Vîjdea
2018-01-11 21:19:42 +01:00
parent c225f66fb7
commit 57d77cc48a
6 changed files with 23 additions and 15 deletions
+2 -2
View File
@@ -3,9 +3,9 @@ class SwaggerError(Exception):
class SwaggerValidationError(SwaggerError):
def __init__(self, msg, validator_name, spec, source_codec, *args):
def __init__(self, msg, errors=None, spec=None, source_codec=None, *args):
super(SwaggerValidationError, self).__init__(msg, *args)
self.validator_name = validator_name
self.errors = errors
self.spec = spec
self.source_codec = source_codec