X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/89ccd16497c79398a27387bf42016e888afec9eb..dbfa7041eadc465c1aaddac3fca41624cbed852d:/validators.py?ds=sidebyside 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):