[
https://issues.apache.org/jira/browse/AVRO-1645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14358522#comment-14358522
]
ASF GitHub Bot commented on AVRO-1645:
--------------------------------------
GitHub user dasch opened a pull request:
https://github.com/apache/avro/pull/26
AVRO-1645: Use a special exception class for unknown named type errors
This allows handling the error be finding and loading the referenced schema.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/dasch/avro dasch/unknown-type-error
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/avro/pull/26.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #26
----
commit 374b21196234ed654612883a8384797278e5b0f7
Author: Daniel Schierbeck <[email protected]>
Date: 2015-03-12T11:13:02Z
Use a special exception class for unknown named type errors
----
> Improved handling of missing named types
> ----------------------------------------
>
> Key: AVRO-1645
> URL: https://issues.apache.org/jira/browse/AVRO-1645
> Project: Avro
> Issue Type: Improvement
> Reporter: Daniel Schierbeck
>
> I've written a Ruby library that wraps the Avro Ruby library and provides a
> "registry" of schemas. The idea is to allow users to avoid repeating
> themselves by allowing inter-schema references using the type names. At
> runtime any missing type is resolved by loading the relevant schema from disk.
> This works great, but depends on parsing the error message from the
> Avro::SchemaParseError exception, extracting the name of the missing type. If
> there was a more specific subclass, e.g. Avro::MissingSchemaError, that
> provided an attribute with the name of the schema, my library would be a lot
> more robust. I'd rather not have everything break if you change the error
> message.
> I'd be happy to code this myself (it's a rather trivial and backwards
> compatible change), but I'd prefer to get a +1 here first.
> Here's the project: https://github.com/dasch/avro_turf (still in development)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)