|
@@ -1907,10 +1907,12 @@ public class Client implements AutoCloseable {
|
|
|
}
|
|
|
}
|
|
|
if (length <= 0) {
|
|
|
- throw new RpcException("RPC response has invalid length");
|
|
|
+ throw new RpcException(String.format("RPC response has " +
|
|
|
+ "invalid length of %d", length));
|
|
|
}
|
|
|
if (maxResponseLength > 0 && length > maxResponseLength) {
|
|
|
- throw new RpcException("RPC response exceeds maximum data length");
|
|
|
+ throw new RpcException(String.format("RPC response has a " +
|
|
|
+ "length of %d exceeds maximum data length", length));
|
|
|
}
|
|
|
ByteBuffer bb = ByteBuffer.allocate(length);
|
|
|
in.readFully(bb.array());
|