X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/8c6ffb8e54f201a0fb7776fdd865bbbb3d42a29b..4e1191300b4ebea295dee07769dc9da4e7149395:/validators.py 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):