Gyula Komlossi created AVRO-3206:
------------------------------------
Summary: Provide more information in serialization error messages
in SpecificDatumWriter
Key: AVRO-3206
URL: https://issues.apache.org/jira/browse/AVRO-3206
Project: Apache Avro
Issue Type: Improvement
Components: java
Reporter: Gyula Komlossi
In certain cases, when there is an error (like NPE, ClassCastException) in the
"*writeField*" method of the "*SpecificDatumWriter*" class, the thrown
exception doesn't contain the specific field causing the problem.
Similarly as implemented in GenericDatumWriter, the same exceptions could be
caught and their message improved by adding the related field name causing the
problem.
Currently, the message is like this:
{code:java}
java.lang.NullPointerException: null of string of
org.apache.avro.test.TestRecord
{code}
But with the improvement it would be:
{code:java}
java.lang.NullPointerException: null of string in field name of
org.apache.avro.test.TestRecord
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)