Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Avro, mail # user - Design decision question about the Avro Java API


Copy link to this message
-
Design decision question about the Avro Java API
Francis Galiegue 2013-02-27, 04:02
Hello,

The question is quite simple: why is SchemaParseException an unchecked
exception?

This complicates handling parsing errors quite a bit, especially since
it doesn't make the distinction between actual parsing errors and
schema logic errors. For instance, this:

final String input = "\"astring\"";

throws a parsing exception, even though this is valid JSON (but not a
valid schema). And this:

final String input = "string";

also throws a parsing exception, but this time for a good reason,
since this is not valid JSON.

Are there plans to separate these exceptions, and more important, are
there plans to turn these into checked exceptions?

--
Francis Galiegue, [EMAIL PROTECTED]
JSON Schema in Java: http://json-schema-validator.herokuapp.com