Fixed incorrect exception messages

This commit is contained in:
Trustin Lee 2009-01-07 12:56:11 +00:00
parent 5a9d99743d
commit bd403bdb98

View File

@ -80,14 +80,14 @@ public class LengthFieldPrepender extends OneToOneEncoder {
case 2: case 2:
if (length >= 65536) { if (length >= 65536) {
throw new IllegalArgumentException( throw new IllegalArgumentException(
"length does not fit into a byte: " + length); "length does not fit into a short integer: " + length);
} }
header.writeShort((short) length); header.writeShort((short) length);
break; break;
case 3: case 3:
if (length >= 16777216) { if (length >= 16777216) {
throw new IllegalArgumentException( throw new IllegalArgumentException(
"length does not fit into a byte: " + length); "length does not fit into a medium integer: " + length);
} }
header.writeMedium(length); header.writeMedium(length);
break; break;