Julian/jsonschema — pull request #130 by sontek (2013-10-18 03:22:09+00:00)
Title: Clean up the output when an unknow type is found

Makes output go from:

```
Traceback (most recent call last):
File "foo.py", line 49, in
'id': None,
File "/home/sontek/.virtualenvs/jsonschema/jsonschema/jsonschema/validators.py", line 116, in validate
for error in self.iter_errors(*args, **kwargs):
File "/home/sontek/.virtualenvs/jsonschema/jsonschema/jsonschema/validators.py", line 95, in iter_errors
for error in errors:
File "/home/sontek/.virtualenvs/jsonschema/jsonschema/jsonschema/_validators.py", line 219, in type_draft3
if validator.is_type(instance, type):
File "/home/sontek/.virtualenvs/jsonschema/jsonschema/jsonschema/validators.py", line 121, in is_type
raise UnknownType(type)
jsonschema.exceptions.UnknownType: unknown

```

to:

```
Traceback (most recent call last):
File "foo.py", line 49, in
'id': None,
File "/home/sontek/.virtualenvs/jsonschema/jsonschema/jsonschema/validators.py", line 116, in validate
for error in self.iter_errors(*args, **kwargs):
File "/home/sontek/.virtualenvs/jsonschema/jsonschema/jsonschema/validators.py", line 95, in iter_errors
for error in errors:
File "/home/sontek/.virtualenvs/jsonschema/jsonschema/jsonschema/_validators.py", line 219, in type_draft3
if validator.is_type(instance, type):
File "/home/sontek/.virtualenvs/jsonschema/jsonschema/jsonschema/validators.py", line 121, in is_type
raise UnknownType(type, instance, self.schema)
jsonschema.exceptions.UnknownType:
unknown type unknown, in schema:
{'additionalProperties': False, 'type': 'unknown', 'properties': {'id': {'pattern': '^\\d+$', 'type': [None, 'string']}}}

On instance:
{'id': None}

```