Commits

Rob Lanphier  committed 93f4c9a

Fixed an exception snafu

  • Participants
  • Parent commits 920ceb8

Comments (0)

Files changed (1)

File jsonwidget/jsontypes.py

 #!/usr/bin/python
 """Schema format definitions and other json type functions"""
 
+class JsonTypeError(RuntimeError):
+    pass
+
 # Version 1 is the version supported by jsonwidget-javascript
 # Specification: http://robla.net/jsonwidget/jsonschema/
 class schemaformat_v1:
     elif(data is None):
         return fmt.typemap['null']
     else:
-        raise JsonNodeError("unknown type: %s" % type(data).__name__)
+        raise JsonTypeError("unknown type: %s" % type(data).__name__)
 
 
 def convert_type(oldtype=None, oldfmt=schemaformat_v1, newfmt=schemaformat_v2):