Throw an IllegalStateException with an informative message

This commit is contained in:
Peter Palaga
2020-11-10 21:13:58 +01:00
parent 66e43362cc
commit c46c38fd0d

View File

@@ -551,7 +551,7 @@ public class Server implements AutoCloseable, Runnable {
case Message.KEEP_ALIVE:
return 100;
default:
throw new IllegalStateException();
throw new IllegalStateException("Unexpected message type " + m.getType() + ": " + m);
}
}