Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.9.0.0
-
None
-
None
Description
We currently don't perform much validation on the size value read by the protocol types. This means that we end up throwing exceptions like `BufferUnderflowException`, `NegativeArraySizeException`, etc. `Schema.read` catches these exceptions and adds some useful information like:
throw new SchemaException("Error reading field '" + fields[i].name + "': " + (e.getMessage() == null ? e.getClass().getName() : e.getMessage()));
We could do even better by throwing a `SchemaException` with a more user friendly message.