I2CP: Length check exception message improvement

This commit is contained in:
zzz committed 2026-05-29 13:51:13 -04:00
1 parent 6b39d1c2bd
commit 2de2741e4d
2 files changed
+2 -2

No files matched your search

@@ -45,7 +45,7 @@ public class I2CPMessageHandler {
throw new IOException("Connection closed");
}
if (length > MAX_LENGTH)
throw new I2CPMessageException("Invalid message length specified");
throw new I2CPMessageException("Invalid message length: " + length);
int type = in.read();
if (type < 0)
throw new EOFException();
@@ -42,7 +42,7 @@ public abstract class I2CPMessageImpl implements I2CPMessage {
throw new I2CPMessageException("Error reading the length bytes", dfe);
}
if (length > I2CPMessageHandler.MAX_LENGTH)
throw new I2CPMessageException("Invalid message length specified");
throw new I2CPMessageException("Invalid message length: " + length);
int type = in.read();
if (type < 0)
throw new EOFException();