X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/89ccd16497c79398a27387bf42016e888afec9eb..96926ace045422f0f5f1f474a174ebbdc253a023:/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):