Calling "Validate"/"write" raises an AvroTypeException when the input "datum" does not fit the input "expected_schema". It would be useful for users if AvroTypeException specified which fields were not valid representations of the expected_schema, by adding additional information to the string printed when the error is thrown.
The last line of the above example ^ will throw an AvroTypeException, because field "F" isn't an int. If there are multiple fields with incompatible types, the message will only show the first field. Once it is fixed, it will throw another AvroTypeException with the second incompatible type field, and so on.
Current AvroTypeException Output:
Suggested AvroTypeException Output: