add IOOB to supported exceptions
This commit is contained in:
parent
0148c462e0
commit
971ac0475e
|
@ -524,6 +524,14 @@ public abstract class StreamInput extends InputStream {
|
||||||
return (T) readStackTrace(new EOFException(eofMessage), this);
|
return (T) readStackTrace(new EOFException(eofMessage), this);
|
||||||
case 9:
|
case 9:
|
||||||
return (T) readStackTrace(new SecurityException(readOptionalString(), readThrowable()), this);
|
return (T) readStackTrace(new SecurityException(readOptionalString(), readThrowable()), this);
|
||||||
|
case 10:
|
||||||
|
final String sidxMessage = readOptionalString();
|
||||||
|
readThrowable();
|
||||||
|
return (T) readStackTrace(new StringIndexOutOfBoundsException(sidxMessage), this);
|
||||||
|
case 11:
|
||||||
|
final String aidxMessage = readOptionalString();
|
||||||
|
readThrowable();
|
||||||
|
return (T) readStackTrace(new ArrayIndexOutOfBoundsException(aidxMessage), this);
|
||||||
default:
|
default:
|
||||||
assert false : "no such exception for id: " + key;
|
assert false : "no such exception for id: " + key;
|
||||||
}
|
}
|
||||||
|
|
|
@ -471,6 +471,10 @@ public abstract class StreamOutput extends OutputStream {
|
||||||
writeVInt(8);
|
writeVInt(8);
|
||||||
} else if (throwable instanceof SecurityException) {
|
} else if (throwable instanceof SecurityException) {
|
||||||
writeVInt(9);
|
writeVInt(9);
|
||||||
|
} else if (throwable instanceof StringIndexOutOfBoundsException) {
|
||||||
|
writeVInt(10);
|
||||||
|
} else if (throwable instanceof ArrayIndexOutOfBoundsException) {
|
||||||
|
writeVInt(11);
|
||||||
} else {
|
} else {
|
||||||
ElasticsearchException ex;
|
ElasticsearchException ex;
|
||||||
final String name = throwable.getClass().getName();
|
final String name = throwable.getClass().getName();
|
||||||
|
|
Loading…
Reference in New Issue