class InvalidStateException extends RuntimeException

The object is in a state that does not allow the requested operation.