Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

better reporting for a bad schema

  • Loading branch information...
commit a7039d6d8b45bc6cdd0b75327c02dda059d33839 1 parent 244b4de
@spullara authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 file/src/main/java/avrobase/file/FAB.java
View
6 file/src/main/java/avrobase/file/FAB.java
@@ -155,7 +155,11 @@ private Lock readLock(K row) {
Schema schema = schemaCache.get(hash);
if (schema == null) {
File schemaFile = new File(schemaDir, hash);
- schema = Schema.parse(new FileInputStream(schemaFile));
+ try {
+ schema = Schema.parse(new FileInputStream(schemaFile));
+ } catch (IOException ioe) {
+ throw new AvroBaseException("Failed to read schema for hash: " + hash + " row: " + row, ioe);
+ }
schemaCache.put(hash, schema);
hashCache.put(schema, hash);
}
Please sign in to comment.
Something went wrong with that request. Please try again.