Added a number of counting variables to the context when rendering shipherd navigatio...
[philo.git] / validators.py
index 1305afb..8b39abd 100644 (file)
@@ -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):