Use NoSuchBufferException instead of IllegalArgumentException
This commit is contained in:
parent
13d7ee1b2f
commit
bbed0602c1
@ -1146,9 +1146,7 @@ public class DefaultChannelPipeline implements ChannelPipeline {
|
|||||||
out = directOutbound;
|
out = directOutbound;
|
||||||
if (out.hasByteBuffer()) {
|
if (out.hasByteBuffer()) {
|
||||||
if(!(message instanceof ChannelBuffer)) {
|
if(!(message instanceof ChannelBuffer)) {
|
||||||
throw new IllegalArgumentException(
|
throw new NoSuchBufferException();
|
||||||
"cannot write a message whose type is not " +
|
|
||||||
ChannelBuffer.class.getSimpleName() + ": " + message.getClass().getName());
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
msgBuf = true;
|
msgBuf = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user