No need to use our own exception type here. IllegalStateException will do.