Add detailed error message corresponding to the IndexOutOfBoundsException while calling getEntry(...) (#10386)
Motivation: `getEntry(...)` may throw an IndexOutOfBoundsException without any error messages. Modification: Add detailed error message corresponding to the IndexOutOfBoundsException while calling `getEntry(...)` in HpackDynamicTable.java. Result: Easier to debug
This commit is contained in:
parent
f9e8c9ca11
commit
9955ef563e
@ -83,7 +83,7 @@ final class HpackDynamicTable {
|
||||
*/
|
||||
public HpackHeaderField getEntry(int index) {
|
||||
if (index <= 0 || index > length()) {
|
||||
throw new IndexOutOfBoundsException();
|
||||
throw new IndexOutOfBoundsException("Index " + index + " out of bounds for length " + length());
|
||||
}
|
||||
int i = head - index;
|
||||
if (i < 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user