X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/8c6ffb8e54f201a0fb7776fdd865bbbb3d42a29b..f578580e09ad5ef0466d48983c7480fcaccb42b4:/validators.py?ds=inline diff --git a/validators.py b/validators.py index 1305afb..8b39abd 100644 --- a/validators.py +++ b/validators.py @@ -45,8 +45,8 @@ class URLLinkValidator(RegexValidator): def json_validator(value): try: json.loads(value) - except: - raise ValidationError(u'\'%s\' is not valid JSON' % value) + except Exception, e: + raise ValidationError(u'JSON decode error: %s' % e) class TemplateValidationParser(Parser):