replacing XXXjdm by throw_type_error in CodegenRust.py (see #347)

Replacing the XXXjdm comments in CodegenRust.py by throw_type_error calls (see issue #347).