You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Will Sargent (JIRA)" <ji...@apache.org> on 2014/03/10 21:10:42 UTC
[jira] [Updated] (AVRO-1480) AvroTypeException should include
fieldName as distinct field
[ https://issues.apache.org/jira/browse/AVRO-1480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Will Sargent updated AVRO-1480:
-------------------------------
Description:
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.
> 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
>
> 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.2#6252)