datatype.py: Added type info to exceptions