More helpful IllegalArgumentException message
This commit is contained in:
parent
b3be15204d
commit
45de76f58d
@ -98,7 +98,8 @@ public class ServerBootstrap extends AbstractBootstrap<ServerBootstrap> {
|
||||
throw new NullPointerException("channelClass");
|
||||
}
|
||||
if (!ServerChannel.class.isAssignableFrom(channelClass)) {
|
||||
throw new IllegalArgumentException();
|
||||
throw new IllegalArgumentException(
|
||||
"channelClass must be subtype of " + ServerChannel.class.getSimpleName() + '.');
|
||||
}
|
||||
if (channelClass == AioServerSocketChannel.class) {
|
||||
return channelFactory(new AioServerSocketChannelFactory());
|
||||
|
Loading…
Reference in New Issue
Block a user