diff --git a/core/java/src/net/i2p/data/SimpleDataStructure.java b/core/java/src/net/i2p/data/SimpleDataStructure.java index 441bcffac832773ae47ebddb02731a5a156d4bee..3983be17d2424aa36b46f54858028a5edb7511b3 100644 --- a/core/java/src/net/i2p/data/SimpleDataStructure.java +++ b/core/java/src/net/i2p/data/SimpleDataStructure.java @@ -81,7 +81,9 @@ public abstract class SimpleDataStructure extends DataStructureImpl { int length = length(); _data = new byte[length]; int read = read(in, _data); - if (read != length) throw new DataFormatException("Not enough bytes to read the data"); + if (read != length) + throw new DataFormatException("EOF reading " + getClass().getSimpleName() + + ", read: " + read + ", required: " + length); } public void writeBytes(OutputStream out) throws DataFormatException, IOException {