avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Busbey (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AVRO-1480) AvroTypeException should include fieldName as distinct field
Date Fri, 18 Aug 2017 13:14:00 GMT

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

Sean Busbey updated AVRO-1480:
------------------------------
    Labels: beginner  (was: )

> AvroTypeException should include fieldName as distinct field
> ------------------------------------------------------------
>
>                 Key: AVRO-1480
>                 URL: https://issues.apache.org/jira/browse/AVRO-1480
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>    Affects Versions: 1.7.6
>            Reporter: Will Sargent
>            Priority: Minor
>              Labels: beginner
>
> Currently AvroTypeException is defined as 
> public class AvroTypeException extends AvroRuntimeException {
>   public AvroTypeException(String message) { super(message); }
>   public AvroTypeException(String message, Throwable cause) {
>     super(message, cause);
>   }
> }
> And when used in JSONDecoder, field name failures are defined like this:
> throw new AvroTypeException("Expected field name not found: " + fa.fname);
> This means that, in the event of an AvroTypeException, the only way to find which field
has the error is to scan through the error message.
> If the AvroTypeException had a constructor (message, throwable, field) or a subclass
which explicitly provided fields, then it would make error processing much easier.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message