[ 
https://issues.apache.org/jira/browse/AVRO-3206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Kulp resolved AVRO-3206.
-------------------------------
    Fix Version/s: 1.11.0
       Resolution: Fixed

> 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
>    Affects Versions: 1.10.2
>            Reporter: Gyula Komlossi
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.11.0
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> 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)

Reply via email to