Use a NullPointerException or IllegalStateException, because that's what it is. Note that you can provide a custom message with those as well.