You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Gyula Komlossi (Jira)" <ji...@apache.org> on 2021/09/14 15:48:00 UTC

[jira] [Updated] (AVRO-3206) Provide more information in serialization error messages in SpecificDatumWriter

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

Gyula Komlossi updated AVRO-3206:
---------------------------------
    Affects Version/s: 1.10.2

> 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
>          Time Spent: 10m
>  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)