This patch converts the TException into a TProtocolException.
Patch: Tyler Hobbs
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@
1383515 13f79535-47bb-0310-9956-
ffa450edef68
protected void checkReadLength(int length) throws TException {
if (length < 0) {
- throw new TException("Negative length: " + length);
+ throw new TProtocolException("Negative length: " + length);
}
if (checkReadLength_) {
readLength_ -= length;
if (readLength_ < 0) {
- throw new TException("Message length exceeded: " + length);
+ throw new TProtocolException("Message length exceeded: " + length);
}
}
}