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;
|
||||
if (out.hasByteBuffer()) {
|
||||
if(!(message instanceof ChannelBuffer)) {
|
||||
throw new IllegalArgumentException(
|
||||
"cannot write a message whose type is not " +
|
||||
ChannelBuffer.class.getSimpleName() + ": " + message.getClass().getName());
|
||||
throw new NoSuchBufferException();
|
||||
}
|
||||
} else {
|
||||
msgBuf = true;
|
||||
|
Loading…
Reference in New Issue
Block a user