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