improve the error message for unknown doc type from view
add test for DocTypeError
Merge pull request #168 from dannyroberts/better-doctype-error

improve the error message for unknown doc type from view